제출 #1137963

#제출 시각아이디문제언어결과실행 시간메모리
1137963mariam197Combo (IOI18_combo)C++20
5 / 100
1 ms408 KiB
#include<bits/stdc++.h> #include "combo.h" //#include "grader.cpp" using namespace std; string guess_sequence(int n) { string l[4]={"A","B","X","Y"}; string s; if(press(l[0]+l[1])){ if(press(l[1])){ swap(l[0],l[1]); } } else if(press(l[2])){ swap(l[0],l[2]); } else{ swap(l[0],l[3]); } s+=l[0]; while(s.size()<n-1){ string temp=s+l[1]+l[1] + s+l[1]+l[2] + s+l[1]+l[3] + s+l[2]; int x=press(temp); if(x==s.size()+2){ s+=l[1]; } else if(x==s.size()+1){ s+=l[2]; } else{ s+=l[3]; } } if(press(s+l[1])==s.size()+1) s+=l[1]; else if(press(s+l[2])==s.size()+1) s+=l[2]; else s+=l[3]; return s; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...