Submission #401367

#TimeUsernameProblemLanguageResultExecution timeMemory
401367irmuun콤보 (IOI18_combo)C++17
Compilation error
0 ms0 KiB
#include "combo.h" #include<bits/stdc++.h> using namespace std; string p,t="ABXY",x; int a,b,c,i,j,k,d,e,f,g,h; string guess_sequence(int N){ string p; for(i=0;i<4;i++){ p=""; p+=s[i]; d=press(p); if(d==1){ t.erase(t.begin()+i); break; } } for(i=2;i<=N;i++){ x=p; e=0; for(j=0;j<2;j++){ p=x+t[j]; d=press(p); if(d==i){ e=1; } } if(e==0){ p+=s[2]; } } return p; }

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:10:8: error: 's' was not declared in this scope
   10 |     p+=s[i];
      |        ^
combo.cpp:28:10: error: 's' was not declared in this scope
   28 |       p+=s[2];
      |          ^