(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 #1084402

#TimeUsernameProblemLanguageResultExecution timeMemory
1084402acoatoitgsMemory (IOI10_memory)C++17
100 / 100
2 ms596 KiB
#include "grader.h" #include "memory.h" #include <bits/stdc++.h> using namespace std; void play() { vector<int> pos(26, -1); queue<pair<int, int>> done; int i = 0; while (i < 50) { if (!done.empty()) { faceup(done.front().first); faceup(done.front().second); done.pop(); continue; } int p = faceup(++i) - 'A'; if (pos[p] != -1) { faceup(pos[p]); pos[p] = -1; continue; } else { pos[p] = i; p = faceup(++i) - 'A'; if (pos[p] != -1) { done.push({i, pos[p]}); pos[p] = -1; } else pos[p] = i; } } while (!done.empty()) { faceup(done.front().first); faceup(done.front().second); done.pop(); } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...