제출 #152677

#제출 시각아이디문제언어결과실행 시간메모리
152677Segtree콤보 (IOI18_combo)C++14
컴파일 에러
0 ms0 KiB
#include<iostream> #include<algorithm> #include<vector> using namespace std; typedef long long ll; #define mod 1000000007 string guess_sequence(int N){ string d="ABXY"; string s="Y"; for(int r=0;r<3;r++){ string p=""; p+=d[r]; if(press(p)==1)s=p; } char fi=s[0]; for(int i=2;i<=N;i++){ char res='#',rem; ll cnt=0; for(int r=0;r<4;r++){ if(d[r]==fi)continue; cnt++; if(cnt==3){ rem=d[r]; break; } string p=s; p+=d[r]; if(press(p)==i)res=d[r]; } if(res=='#')res=rem; s+=res; } return s; }; /* int main(){ return 0; }*/

컴파일 시 표준 에러 (stderr) 메시지

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:13:5: error: 'press' was not declared in this scope
   13 |  if(press(p)==1)s=p;
      |     ^~~~~
combo.cpp:27:9: error: 'press' was not declared in this scope; did you mean 'res'?
   27 |      if(press(p)==i)res=d[r];
      |         ^~~~~
      |         res