Submission #1252911

#TimeUsernameProblemLanguageResultExecution timeMemory
1252911kkzyrSouvenirs (IOI25_souvenirs)C++20
Compilation error
0 ms0 KiB
void buy_souvenirs(int N, long long P0){ long long nxt = P0 - 1; int how_many_last = 0; for (int i = 1;i < N;i++){ pair<vector<int>, long long> result; result = transaction(nxt); if (result.first.size() == 2 or result.second == 0){ if (result.first.size() == 2){ how_many_last++; } nxt--; } if (i == N - 1){ for (int j = 1;j < (i - how_many_last);j++){ transaction(nxt); } } else{ for (int j = 1;j < i;j++){ transaction(nxt); } } nxt--; } }

Compilation message (stderr)

souvenirs.cpp: In function 'void buy_souvenirs(int, long long int)':
souvenirs.cpp:5:14: error: 'vector' was not declared in this scope
    5 |         pair<vector<int>, long long> result;
      |              ^~~~~~
souvenirs.cpp:5:9: error: 'pair' was not declared in this scope
    5 |         pair<vector<int>, long long> result;
      |         ^~~~
souvenirs.cpp:5:21: error: expected primary-expression before 'int'
    5 |         pair<vector<int>, long long> result;
      |                     ^~~
souvenirs.cpp:6:9: error: 'result' was not declared in this scope
    6 |         result = transaction(nxt);
      |         ^~~~~~
souvenirs.cpp:6:18: error: 'transaction' was not declared in this scope
    6 |         result = transaction(nxt);
      |                  ^~~~~~~~~~~