# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1045341 | speedcode | 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 <vector>
#define ll long long
using namespace std ;
void play() {
ll C=1,t=0,l=0,m=0 ;
char x,y ;
vector<char> sel(51,0);
while (t<25) {
x=faceup(C) ;
C++ ;
y=faceup(C) ;
C-- ;
if (y==x){
t++ ;
}else {
for (ll i=1 ; i<C ; i++) {
if (x==sel[i]) {
faceup(C) ;
faceup(i) ;
l++ ;
t++ ;
}
if (y==sel[i]) {
C++ ;
faceup(C) ;
faceup(i) ;
C-- ;
m++ ;
t++ ;
}
}
sel[C]=x ;
sel[C+1]=y ;
l=0 ;
m=0 ;
}
C=C+2 ; ;
}
}