# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
298269 | aloo123 | 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 <bits/stdc++.h>
char a[51];
bool vis[51];
map<char,pair<int,int>> m;
void play() {
for(int i = 1;i<=50;i++){
a[i] = faceup(i);
}
for(int i =1;i<=50;i++){
if(vis[i] == false) continue;
for(int j = 1;j<=50;j++){
if(vis[j] == false && a[i] == a[j]){
m[a[i]] = make_pair(i,j);
vis[j] = true;
vis[i] = true;
break;
}
}
}
for(char c = 'A';c<='Y';c++){
faceup(m[c].first);
faceup(m[c].second);
}
}