摘要:
#include <stdio.h> #include <time.h> #include <stdlib.h> #define swape(a, b) ({\ __typeof(a) temp = a;\ a = b; b = temp;\ }) typedef struct priority_q 阅读全文
摘要:
#include <stdio.h> #include <stdlib.h> #include <string.h> typedef struct Node { char *data; struct Node *next; } Node; typedef struct hash_table { No 阅读全文
摘要:
#include <stdio.h> #define P(func, ar, m, x) ({\ printf("%s => %d == %d\n", #func, x, func(ar, m, x));\ }) int binary_search(int *ar, int m, int x) { 阅读全文
摘要:
#include <stdio.h> #include <time.h> #include <string.h> #include <stdlib.h> #define swap(a, b) ({\ __typeof(a) __temp = a;\ a = b; b = __temp;\ }) #d 阅读全文
摘要:
#include <stdio.h> #include <string.h> #include <time.h> #include <stdlib.h> #define swape(a, b) ({\ __typeof (a) temp;\ temp = a;\ a = b;\ b = temp;\ 阅读全文
摘要:
#include <stdio.h> #include <stdlib.h> #include <time.h> #define max(a, b) ((a) > (b) ? (a) : (b)) typedef struct Node { int key, height; struct Node 阅读全文
摘要:
#include <stdio.h> #include <time.h> #define MAX 100 void cha_ru (int *ar) { int i, j, c, b; for (i = 1; i < MAX; ++i) { for (j = 0; j < i; ++j) if (a 阅读全文
摘要:
#include <stdio.h> #include <stdlib.h> #include <time.h> #define MAX 500 void sort(int *); int fond(int *, int, int, int); int main () { int arr[MAX], 阅读全文
摘要:
#邻接矩阵 #include <stdio.h> #include <string.h> #define MAX_N 500 typedef struct Graph { int mat[MAX_N][MAX_N]; int n; }Graph; void init(Graph *g, int le 阅读全文
摘要:
#include <stdio.h>#include <stdlib.h>#include <time.h>typedef struct Node { int data; struct Node *lchild, *rchild;} Node;typedef struct Tree { Node * 阅读全文