Submission #1288626

#TimeUsernameProblemLanguageResultExecution timeMemory
1288626alexrana2626Souvenirs (IOI25_souvenirs)C++20
Compilation error
0 ms0 KiB
{ pair<vector<int>, long long> res; if (N == 2) { transaction(P0 - 1); return; } if (N == 3) { res = transaction(P0 - 1); long long x = res.second; if (res.first.size() == 2) { transaction((P0 - x - 1) / 2); return; } else { long long P1 = P0 - x - 1; transaction(P1 - 1); transaction(P1 - 1); return; } } if (P0 == N) { for (int i = 0; i < N; i++) { int j = i; while (j--) { transaction(N - i); } } return; } else { long long sm = N - 2; for (int i = 1; i < N; i++) { long long cnt = i - 1; if (i == N-1) { cnt = sm; } res = transaction(P0 - 1); long long x = res.second; if (res.first.size() == 2){sm--;x++;} long long P = P0 - 1 - x; P0 = P; for (int j = 0; j < cnt; j++) { transaction(P); } } return; } }

Compilation message (stderr)

souvenirs.cpp:1:1: error: expected unqualified-id before '{' token
    1 | {
      | ^