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() {
std :: vector<int> pos[25];
for (int i = 1; i <= 50; ++i)
{
char x = faceup(i);
if (i % 2 == 0
&& !pos[x - 'A'].empty()
&& (pos[x - 'A'].back()) % 2 == 1
&& pos[x - 'A'].back() + 1 == i)
pos[x - 'A'].clear();
else pos[x - 'A'].push_back(i);
}
for (int i = 0; i < 25; ++i)
{
for (int x : pos[i])
faceup(x);
}
return;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |