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

#TimeUsernameProblemLanguageResultExecution timeMemory
343413BlancaHMMemory (IOI10_memory)C++14
100 / 100
2 ms384 KiB
#include "memory.h" #include "grader.h" void play() { int pos[25]; // pos[i] contiene una de las posiciones de esa letra int sumPos[25] = {0}; // sumPos[i] contiene la suma de las 2 posiciones de esa letra int curChar; for (int i = 1; i <= 50; i++) { // levantamos todas las cartas y guardamos el resultado curChar = faceup(i) - 'A'; pos[curChar] = i; sumPos[curChar] += i; } for (int i = 0; i < 25; i++) { // levantamos las parejas de cartas que contienen la misma letra faceup(pos[i]); faceup(sumPos[i] - pos[i]); } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...