# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
199169 | ivandasfs | 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 <bits/stdc++.h>
using namespace std;
#define x first
#define y second
#define mp make_pair
#define pb push_back
typedef long long ll;
const ll MOD = 1e9+7;
const ll INF = 1e9+5;
int gdje[150];
char ch[150];
void play() {
for (int i=1 ; i<=50 ; i+=2) {
char a = faceup(i);
char b = faceup(i+1);
ch[i] = a;
ch[i+1] = b;
gdje[a] = i;
gdje[b] = i+1;
}
for (int i=1 ; i<=50 ; i++) {
if (gdje[ch[i]] == i) continue;
faceup(i);
faceup(gdje[i]);
}
}