# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
198828 | Markomafko972 | 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() {
vector<int> v[50];
for (int i = 1; i <= 50; i++) v[i].clear();
for (int i = 1; i <= 50; i+= 2) {
char c1 = faceup(i);
char c2 = faceup(i+1);
if (c1 != c2) {
v[c1-'A'+1].push_back(i);
v[c2-'A'+1].push_back(i+1);
}
}
for (int i = 1; i <= 50; i++) {
if (v[i].size() == 2) {
faceup(v[i][0]);
faceup(v[i][1]);
}
}
}