# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
552096 | Trisanu_Das | 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"
using namespace std;
#include "memory.h"
#include <bits/stdc++.h>
void play() {
// storing the positions of previously found values
int pos[51] = {};
for(int i = 1; i <= 50; i++) {
int card = faceup(i);
// if not previously found check with others
if(pos[card] == 0) pos[r] = i, faceup(i % 50 + 1);
// but if found earlier, get a chocolate!!
else faceup(pos[card]);
}
}