Submission #1045111

#TimeUsernameProblemLanguageResultExecution timeMemory
1045111OkassaMemory (IOI10_memory)C++14
Compilation error
0 ms0 KiB
#include "grader.h" #include <vector> #define ll long long using namespace std ; void play() { ll C=1,t=0,x,y,l=0,m=0 ; vector<ll> sel(51,0); while (t<25) { faceup(C) ; x=faceup(C) ; C++ ; faceup(C) ; y=faceup(C) ; C-- ; if (y==x){ t++ ; }else { for (ll i=1 ; i<=50 ; i++) { if (x==sel[i]) { faceup(C) ; faceup(i) ; l++ ; t++ ; } } for (ll i=0 ; i<50 ; i++) { if (y==sel[i]) { C++ ; faceup(C) ; faceup(i) ; C-- ; m++ ; t++ ; } } if (l==0) { sel[s[z]]=x ; }else if (m==0){ sel[s[z+1]]=y ; }else { l=0 ; m=0 ; } } C=C+2 ; ; } }

Compilation message (stderr)

memory.cpp: In function 'void play()':
memory.cpp:38:17: error: 's' was not declared in this scope
   38 |             sel[s[z]]=x ;
      |                 ^
memory.cpp:38:19: error: 'z' was not declared in this scope
   38 |             sel[s[z]]=x ;
      |                   ^
memory.cpp:40:17: error: 's' was not declared in this scope
   40 |             sel[s[z+1]]=y ;
      |                 ^
memory.cpp:40:19: error: 'z' was not declared in this scope
   40 |             sel[s[z+1]]=y ;
      |                   ^