Submission #1264745

#TimeUsernameProblemLanguageResultExecution timeMemory
1264745comgaTramAnhMemory (IOI10_memory)C++20
100 / 100
0 ms392 KiB
#include "grader.h" #include "memory.h" int posFirst[25], posSecond[25]; void play() { for (int ch = 0; ch < 25; ch++) { posFirst[ch] = -1; posSecond[ch] = -1; } for (int i = 1; i <= 50; i += 2) { char firstCard = faceup(i); char secondCard = faceup(i + 1); if (posFirst[firstCard - 'A'] == -1) { posFirst[firstCard - 'A'] = i; } else { posSecond[firstCard - 'A'] = i; } if (posFirst[secondCard - 'A'] == -1) { posFirst[secondCard - 'A'] = i + 1; } else { posSecond[secondCard - 'A'] = i + 1; } } for (int ch = 0; ch < 25; ch++) { faceup(posFirst[ch]); faceup(posSecond[ch]); } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...