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 <vector>
using namespace std;
void play() {
vector<char> v(51);
vector<bool> used(51, false);
for (int i = 1; i <= 50; i++){
v[i] = faceup(i);
if (i % 2 == 0 && v[i] == v[i - 1]){
used[i] = used[i - 1] = true;
}
}
for (int i = 1; i <= 50; i++){
for (int j = i + 1; j <= 50; j++){
if (!used[i] && !used[j] && v[i] == v[j]){
faceup(i);
faceup(j);
used[i] = used[j] = true;
break;
}
}
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |