# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1243010 | Circling | Combo (IOI18_combo) | C++20 | 0 ms | 0 KiB |
#include <iostream>
#include <iomanip>
#include <utility>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <algorithm>
#include <cmath>
#include <cstdint>
using namespace std;
int press(string p){
}
string guess_sequence(int n){
string ans, comb, c1, c2, c3;
char first;
if (press("AB") > 0) first = "BA"[press("A")];
else first = "XY"[press("Y")];
c1 = "AB"[first < 'B'];
c2 = "BX"[first < 'X'];
c3 = "XY"[first < 'Y'];
ans += first;
comb = c1 + c2 + c3;
for (int i = 1; i < n - 1; i++) ans += comb[press(ans + c2 + ans + c3 + c1 + ans + c3 + c2 + ans + c3 + c3) - i];
if (press(ans + c1) == n) return ans + c1;
else if (press(ans + c2) == n) return ans + c2;
else return ans + c3;
}
int main(){
}