제출 #232245

#제출 시각아이디문제언어결과실행 시간메모리
232245pere_gil콤보 (IOI18_combo)C++14
0 / 100
1 ms200 KiB
#include "combo.h" #include <iostream> using namespace std; string guess_sequence(int N){ string s=""; string re; if(press("A")==1){ s+="A"; re="BXY"; } else{ if(press("B")==1){ s+="B"; re="AXY"; } else{ if(press("X")==1){ s+="X"; re="ABY"; } else{ s+="Y"; re="ABX"; } } } bool ja; for(int i=0;i<N;i++){ if(press(s+re[0])>0){ s+=re[0]; ja=false; } else{ if(press(s+re[1])>0){ s+=re[1]; } else{ s+=re[2]; } } } return s; }

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

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:29:10: warning: variable 'ja' set but not used [-Wunused-but-set-variable]
   29 |     bool ja;
      |          ^~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...