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

#TimeUsernameProblemLanguageResultExecution timeMemory
414510dxz05Memory (IOI10_memory)C++14
100 / 100
3 ms296 KiB
#include "grader.h" #include "memory.h" #include <vector> using namespace std; void play() { vector<char> v(51); vector<bool> used(51, false); for (int i = 1; i <= 50; i++){ v[i] = faceup(i); if (i % 2 == 0 && v[i] == v[i - 1]){ used[i] = used[i - 1] = true; } } for (int i = 1; i <= 50; i++){ for (int j = i + 1; j <= 50; j++){ if (!used[i] && !used[j] && v[i] == v[j]){ faceup(i); faceup(j); used[i] = used[j] = true; break; } } } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...