# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
717673 | nikos | Memory (IOI10_memory) | C++17 | 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"
void play() {
char a, b;
vector< pair<int, int> > v;
for(int i = 0; i < 25; i++){
v.pb(make_pair(0, 0));
}
for(int i = 1; i < 50; i += 2){
a = faceup(i);
b = faceup(i + 1);
if(v[a - 'A'].first != 0){
v[a - 'A'].first = i;
}
else{
v[a - 'A'].second = i;
}
if(v[b - 'A'].first != 0){
v[b - 'A'].first = i;
}
else{
v[b - 'A'].second = i;
}
}
for(int i = 0; i < v.size(); i++){
faceup(v[i].first);
faceup(v[i].second);
}
return;
}