1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
| #include <stdio.h> #include <stdlib.h> #include <assert.h>
int bruteforce(int* values, int n) { for (int i = 0; i < 100000; i++) { int flag = 1; srand(i); for (int j = 0; j < n; j++) { if (values[j] != rand()) { flag = 0; break; } } if (flag) return i; }
assert(0); }
int main() { int _a[] = { 15356, 8563, 9659, 14347, 11283, 30142, 29542, 18083, 5057, 5531, 23391, 21327, 20023, 14852, 4865, 23820, 16725, 18665, 25042, 24920 }; int _b[] = { 11190, 27482, 980, 5419, 28164, 9548, 16558, 22218, 6113, 21959, 13889, 11580, 2625, 19397, 25139, 8167, 28165, 3950, 25496, 27351 }; int a = bruteforce(_a, 20); int b = bruteforce(_b, 20);
printf("%dKCTF%d\n", a, b); return 0; }
|