# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
468441 | a_aguilo | Memory (IOI10_memory) | C++14 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "grader.h"
#include "memory.h"
#include <bits/stdc++.h>
using namespace std;
void play() {
int candies = 0;
map <char, int> M;
set <int> asked;
set <char> received;
while (candies < 25){
int i = 1;
while (i <= 25){
char c = faceup (i);
if (received.find(c) != received.end()){
faceup (M[c]);
candies ++;
}
else{
received.insert(c);
M[c] = i;
++i;
char new = faceup (i);
if (new == c){
candies ++;
}
else {
i--;
}
}
++i;
}
}
}