#include #include #include #include /* gcc -std=gnu99 maxdeg-gnk.c -o maxdeg-gnk */ void init_random_generator(){ struct timespec time; clock_gettime(CLOCK_REALTIME, &time); srandom(time.tv_nsec ^ time.tv_sec); } int uniform(int n){ return random() % n; // Linux random() function, low-order bits safe } bool in(int* tab, int len, int value){ for(int i=0; i= 4) m = atoi(argv[3]); int* neighbors = (int*)malloc(sizeof(int)*k); int* indegree = (int*)malloc(sizeof(int)*n); for(int i=0; i max) max = k+indegree[v]; printf("%d\n",max); fflush(stdout); } free(indegree); free(neighbors); return EXIT_SUCCESS; }