# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
477106 | glome | 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"
#include<bits/stdc++.h>
using namespace std;
void play() {
map<char, vector<int>> m;
int last = ear
;
vector<char> chars(51);
for (int i = 1; i<=50; i++) {
bool ok = 0;
for (int k = i + 1; k<=50; k++) {
if(chars[k] == chars[i]) {
ok = 1;
char a = faceup(k), b = faceup(i);
break;
}
}
if(ok) {
continue;
}
for (int j = last+1; j<=50; j++) {
char a = faceup(i);
char b = faceup(j);
chars[i] = a;
chars[j] = b;
if(a == b) {
last = j;
break;
}
}
}
return;
}