제출 #1063415

#제출 시각아이디문제언어결과실행 시간메모리
1063415ender콤보 (IOI18_combo)C++17
0 / 100
0 ms344 KiB
#include "combo.h" #include <bits/stdc++.h> using namespace std; std::string guess_sequence(int N) { vector<char> c = {'A', 'B', 'X', 'Y'}; string s = ""; int coins = 1; if(press(s + c[0] + c[1]) > 0){ if(press(s + c[0]) > 0) { s = c[0]; c.erase(c.begin()); } else { s = c[1]; c.erase(c.begin() + 1); } } else { if(press(s + c[2]) > 0) { s = c[2]; c.erase(c.begin() + 2); } else { s = c[3]; c.erase(c.begin() + 3); } } if(coins == N){ return s; } while(coins != N-1){ cout << s+c[0]+s+c[1]+c[0]+s+c[1]+c[1]+s+c[1]+c[2] << "\n"; int curr = press(s+c[0]+s+c[1]+c[0]+s+c[1]+c[1]+s+c[1]+c[2]); if(curr == coins+1) { s += c[0]; } else if(curr == coins+2) { s += c[1]; } else{ s += c[2]; } coins++; } if(press(s + c[0]) > coins){ s += c[0]; } else if(press(s + c[1]) > coins) { s += c[1]; } else { s += c[2]; } return s; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...