# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
198829 | Markomafko972 | Memory (IOI10_memory) | C++14 | 6 ms | 376 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"
void play() {
int v[50][5];
for (int i = 1; i <= 50; i++) v[i][0] = 0, v[i][1] = 0;
for (int i = 1; i <= 50; i+= 2) {
char c1 = faceup(i);
char c2 = faceup(i+1);
if (c1 != c2) {
if (v[c1-'A'+1][0] == 0) v[c1-'A'+1][0] = i;
else v[c1-'A'+1][1] = i;
if (v[c2-'A'+1][0] == 0) v[c2-'A'+1][0] = i+1;
else v[c2-'A'+1][1] = i+1;
}
}
for (int i = 1; i <= 50; i++) {
if (v[i][1] != 0) {
faceup(v[i][0]);
faceup(v[i][1]);
}
}
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |