// 03-09: some random cases, n = 2,3,4,5,10,15,20 // may not be possible // // 10-18: some random cases, n = 1,2,3,4,5,10,15,20,20 // possible, everything done // 19-21: no deadlines on any tasks, n = 10,15,20 // 22,23: no deadline but can't take all the tasks, n = 15, 20 // 24,25: something with tie-breaking // 26-29: more random cases, n = 5, 10, 15, 20 #include #include #include #include using namespace std; random_device rd; default_random_engine e1(rd()); int rand_int(int low, int high) { uniform_int_distribution uniform_dist(low, high); return uniform_dist(e1); } void random_case(int n) { int T = rand_int(300, 400); cout << n << ' ' << T << endl; for (int i = 0; i < n; i++) { cout << rand_int(90, 100) << ' '; cout << rand_int(60, 100) << ' '; int d = rand_int(0,3); if (d == 0) { d = -1; } else { d = rand_int(400,1000); } cout << d << endl; } for (int i = 0; i < n+2; i++) { for (int j = 0; j < n+2; j++) { if (j) cout << ' '; if (i == j) { cout << 0; } else { cout << rand_int(60, 100); } } cout << endl; } } int main(int argc, char *argv[]) { int n = atoi(argv[1]); random_case(n); return 0; }