# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
717618 | EntityPlantt | 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 <vector>
void play() {
std::vector <int> mem[25];
int i;
for (i = 0; i < 50; i += 2) {
char a = faceup(i), b = faceup(i + 1);
mem[a - 'A'].push_back(i);
mem[b - 'A'].push_back(i + 1);
if (a == b) {
mem[a - 'A'].clear();
}
}
for (i = 0; i < 25; i++) {
if (mem[i]) {
faceup(mem[i][0]);
faceup(mem[i][1]);
}
}
}