제출 #118615

#제출 시각아이디문제언어결과실행 시간메모리
118615Autoratch콤보 (IOI18_combo)C++14
0 / 100
1 ms200 KiB
#include <bits/stdc++.h> #include "combo.h" using namespace std; string guess_sequence(int n) { string all = "ABXY",pos,ans; char f; for(int i = 0;i < 4;i++) if(press(""+all[i])) f = all[i]; else pos+=all[i]; for(int i = 1;i < n;i++) { string tmp = ans+pos[0]; for(int j = 0;j < 3;j++) tmp+=ans+pos[1]+pos[j]; int ret = press(tmp); if(ret==0) ans+=pos[2]; else if(ret==i) ans+=pos[0]; else ans+=pos[1]; } return ans; }

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

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:8:13: warning: variable 'f' set but not used [-Wunused-but-set-variable]
    8 |        char f;
      |             ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...