제출 #285401

#제출 시각아이디문제언어결과실행 시간메모리
285401Pichon5콤보 (IOI18_combo)C++17
30 / 100
64 ms580 KiB
#include "combo.h" #include <bits/stdc++.h> #define pb push_back using namespace std; string guess_sequence(int N){ vector<char>v; char arr[4]={'A','B','X','Y'}; int c=0; string s="",ss; if(press("X")==1){ s+='X'; }else{ if(press("Y")==1){ s+='Y'; }else{ if(press("A")==1){ s+='A'; }else{ s+='B'; } } } for(int i=0;i<4;i++){ if(arr[i]!=s[0]){ v.pb(arr[i]); } } for(int i=2;i<=N;i++){ for(int l=0;l<3;l++){ string ss=s+v[l]; if(l==2){ s+=v[l]; break; } if(press(ss)==i){ s=ss; break; } } } return s; }

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

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:8:9: warning: unused variable 'c' [-Wunused-variable]
    8 |     int c=0;
      |         ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...