Submission #1045043

#TimeUsernameProblemLanguageResultExecution timeMemory
1045043OkassaMemory (IOI10_memory)C++14
0 / 100
0 ms344 KiB
#include "grader.h" #include <vector> #define ll long long using namespace std ; void play() { ll t=0,x,y,l=0,m=0 ; vector<ll> sel(50,0); vector<ll> s(50,0) ; for (int w=0 ; w<50 ; w++) { s[w]=w+1 ; } while (t<25) { ll z=0 ; faceup(s[z]) ; x=faceup(s[z]) ; faceup(s[z+1]) ; y=faceup(s[z+1]) ; if (y==x){ t++ ; }else { for (ll i=0 ; i<50 ; i++) { if (x==sel[i]) { faceup(z) ; faceup(i) ; s.erase(s.begin(),s.begin()+s[z]-1) ; s.erase(s.begin(),s.begin()+i-1) ; l++ ; t++ ; } } for (ll i=0 ; i<50 ; i++) { if (y==sel[i]) { faceup(s[z+1]) ; faceup(i) ; s.erase(s.begin(),s.begin()+s[z+1]-1) ; s.erase(s.begin(),s.begin()+i-1) ; m++ ; t++ ; } } if (l==0) { sel[s[z]]=x ; }else if (m==0){ sel[s[z+1]]=y ; }else { l=0 ; m=0 ; } } z++ ; } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...