Skip to content

Instantly share code, notes, and snippets.

#include <iostream>
#include <string>
struct {
int parent;
int child;
int sibling;
} typedef node;
#include<iostream>
// Bubblesort
void bubblesort(int A[], int n)
{
for (int i = 0; i < n; i++) {
for (int j = n - 1; j > 0; j--) {
if (A[j] < A[j - 1]) {
int tmp = A[j];
A[j] = A[j - 1];
#include<iostream>
const int K = 10000;
// Countingsort
void countingsort(int A[], int B[], int n)
{
int C[10001];
// Initialize
for (int i = 0; i <= K; i++)
#include <iostream>
#include <string>
using namespace std;
struct {
unsigned int num;
char s;
}typedef card;
#include <iostream>
using namespace std;
// Exchange
void exchange(int A[], int i, int j)
{
int tmp = A[i];
A[i] = A[j];
A[j] = tmp;
#include <iostream>
using namespace std;
int num_comp = 0;
const int MAX = 500000;
int L[MAX/2 + 2];
int R[MAX/2 + 2];
const int SENTINEL = 2000000000;
#include<iostream>
// Print all elemets in array
void print(int A[], int N)
{
for (int i = 0; i < N; i++) {
if (i != 0)
std::cout << " ";
std::cout << A[i];
}
#include <Windows.h>
#include <iostream>
#include <opencv2/highgui.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/video/background_segm.hpp>
#include <opencv2\video\tracking.hpp>
int main(int argc, char** argv)
#include <dlib/gui_widgets.h>
#include <dlib/image_io.h>
#include <dlib/image_transforms.h>
#include <fstream>
using namespace std;
using namespace dlib;
// ----------------------------------------------------------------------------