(UPD: 2024-12-04 14:48 UTC) Judge is not working due to Cloudflare incident. (URL) We can do nothing about it, sorry. After the incident is resolved, we will grade all submissions.

Submission #290953

#TimeUsernameProblemLanguageResultExecution timeMemory
290953Tc14Meetings (IOI18_meetings)C++17
Compilation error
0 ms0 KiB
//#pragma GCC optimize("O3") #include <bits/stdc++.h> using namespace std; #define ve vector typedef long long ll; typedef pair<int, int> pii; const int INF = 1e9 + 10; void create_circuit(int m, int* A) { int n, l, s, k, z; int *C, *X, *Y; ve<bool> B; n = 10; l = max((int)ceil(log2(n)), 1); s = 1 << l; cout << n << endl; C = new int[m + 1]; X = new int[s - 1]; Y = new int[s - 1]; B = ve<bool>(s); for (int i = 0; i <= m; i++) C[i] = -1; for (int i = 1; i < s / 2; i++) { X[i - 1] = -(2 * i); Y[i - 1] = -(2 * i + 1); } for (int i = 0; i < s; i++) { k = 1; for (int j = 0; j < l - 1; j++) { if (B[k]) { B[k] = !B[k]; k = -Y[k - 1]; } else { B[k] = !B[k]; k = -X[k - 1]; } } if (i < n) z = i + 1; else z = -1; if (B[k]) { B[k] = !B[k]; Y[k - 1] = z; } else { B[k] = !B[k]; X[k - 1] = z; } } /* for (int i = 0; i < s - 1; i++) { cout << X[i] << " " << Y[i] << endl; } */ answer(C, X, Y); }

Compilation message (stderr)

meetings.cpp: In function 'void create_circuit(int, int*)':
meetings.cpp:67:5: error: 'answer' was not declared in this scope
   67 |     answer(C, X, Y);
      |     ^~~~~~