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

#TimeUsernameProblemLanguageResultExecution timeMemory
545506AJ00Memory (IOI10_memory)C++14
100 / 100
2 ms228 KiB
#include <bits/stdc++.h> #include "grader.h" #include "memory.h" using namespace std; vector<pair<int,int>> ans; pair<int,int> temp[25]; void play(){ for (int i = 0; i < 25; i++){ temp[i] = {-1,-1}; } int candies = 0; for (int i = 1; i <= 50; i++){ int a; char ch = faceup(i); a = (ch-'A'); if (temp[a].first != -1){ temp[a].second = i; ans.push_back(temp[a]); } else { temp[a].first = i; } } for (int i = 0; i < 25; i++){ faceup(ans[i].first); faceup(ans[i].second); } }

Compilation message (stderr)

memory.cpp: In function 'void play()':
memory.cpp:13:9: warning: unused variable 'candies' [-Wunused-variable]
   13 |     int candies = 0;
      |         ^~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...