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 <bits/stdc++.h>
#include <grader.h>
using namespace std;
void play() {
int candy = 0;
vector<int> seen(50, -1);
for (int i = 0; i < 50; ++i) seen[i] = faceup(i + 1);
for (int i = 0; i < 50; ++i) {
if (seen[i] == -1) continue;
for (int j = i + 1; j < 50; ++j) {
if (seen[i] == seen[j]) {
faceup(i + 1);
faceup(j + 1);
candy++;
seen[j] = -1;
if (candy == 25) return;
break;
}
}
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |