제출 #690510

#제출 시각아이디문제언어결과실행 시간메모리
690510zeroesandones콤보 (IOI18_combo)C++17
0 / 100
2 ms288 KiB
#include <bits/stdc++.h> #include "combo.h" using namespace std; using ll = long long; using vi = vector<long long>; #define pb emplace_back std::string guess_sequence(int N) { char start; if(press("A")) start = 'A'; else if (press("B")) start = 'B'; else if(press("X")) start = 'C'; else start = 'Y'; string res; res += start; set<char> moves{'A', 'B', 'X', 'Y'}; moves.erase(start); ll curr = 1; for(auto x : moves) { ll gain = press(res + x); if(gain > curr) { curr = gain; res += x; } } for(auto x : moves) { ll gain = press(res + x); if(gain > curr) { curr = gain; res += x; } } return res; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...