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;
char nw;
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;
nw = faceup (i);
if (nw == c){
candies ++;
}
else if (received.find(c) != received.end()) {
i--;
}
}
++i;
}
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |