제출 #313513

#제출 시각아이디문제언어결과실행 시간메모리
313513Jarif_Rahman콤보 (IOI18_combo)C++17
10 / 100
146 ms576 KiB
#include "combo.h" #include <bits/stdc++.h> #define pb push_back #define f first #define sc second using namespace std; typedef long long int ll; typedef string str; str guess_sequence(int n){ str s = ""; int r = 0; while(n--){ int ab = press(s+"A"+s+"B"); int xy = press(s+"X"+s+"Y"); if(ab > r){ int a = press(s+"A"); int b = press(s+"B"); if(a > r){ s+="A"; r = a; continue; } if(b > r){ s+="B"; r = b; continue; } } if(xy > r){ int x = press(s+"X"); int y = press(s+"Y"); if(x > r){ s+="X"; r = x; continue; } if(y > r){ s+="Y"; r = y; continue; } } } return s; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...