제출 #318397

#제출 시각아이디문제언어결과실행 시간메모리
318397soroush콤보 (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 ans = ""; string f = "A"; if(press(ans + "B") == 1) f = "B"; else if(press(ans + "X") == 1) f = "X"; else if(press(ans + "Y") == 1) f = "Y"; ans += f; vector < string > v , vec = {"A" , "B" , "X" , "Y"}; for(int i = 0 ; i < 4 ; i ++){ auto s = vec.back(); vec.pop_back(); if(s!=f) v.push_back(s); } for(int i = 1 ; i < n ; i ++){ int res = press(ans + vec[0] + ans + vec[1] + vec[0] + ans + vec[1] + vec[1] + ans + vec[1] + vec[2]); if(res == i) ans += vec[2]; if(res == i + 1) ans += vec[0]; if(res == i + 2) ans += vec[1]; } return(ans); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...