Main.cpp: In function 'int main()':
Main.cpp:14:13: error: expected ';' before 'vector'
14 | cin >> N
| ^
| ;
15 | vector<int> d(N + 2), x(N + 2);
| ~~~~~~
Main.cpp:16:41: error: 'd' was not declared in this scope
16 | for (int i = 1; i <= N; ++i) cin >> d[i] >> x[i];
| ^
Main.cpp:16:49: error: 'x' was not declared in this scope
16 | for (int i = 1; i <= N; ++i) cin >> d[i] >> x[i];
| ^
Main.cpp:18:60: error: expected primary-expression before '/' token
18 | const int B = int(sqrt(N) + 1); */
| ^
Main.cpp:19:33: error: expected primary-expression before 'pref'
19 | vector<vector<vector<int>>> pref(B + 1);
| ^~~~
Main.cpp:21:9: error: 'pref' was not declared in this scope
21 | pref[dd].resize(dd);
| ^~~~
Main.cpp:30:13: error: 'd' was not declared in this scope
30 | if (d[i] == 0) {
| ^
Main.cpp:35:23: error: 'pref' was not declared in this scope
35 | auto &v = pref[dd][r];
| ^~~~
Main.cpp:37:44: error: 'x' was not declared in this scope
37 | long long k = min<long long>(x[i], cnt);
| ^
Main.cpp:43:40: error: 'x' was not declared in this scope
43 | while (cur <= N && taken < x[i]) {
| ^
Main.cpp:49:16: error: expected primary-expression before '/' token
49 | } */
| ^
Main.cpp:50:9: error: expected primary-expression before 'for'
50 | for (int dd = 1; dd <= B; ++dd) {
| ^~~
Main.cpp:50:26: error: 'dd' was not declared in this scope
50 | for (int dd = 1; dd <= B; ++dd) {
| ^~