제출 #903899

#제출 시각아이디문제언어결과실행 시간메모리
903899zhasyn콤보 (IOI18_combo)C++17
30 / 100
25 ms1208 KiB
#include "combo.h" #include <bits/stdc++.h> #define pb push_back #define pf push_front using namespace std; #define F first #define S second typedef long long ll; #define pii pair <int, int> #define pll pair <ll, ll> typedef long double ld; const ll N = 2 * 1e5 + 10, len = 316; const ll mod = 1e9 + 7; ll um(ll a, ll b){ return ((1LL * a * b) % mod + mod) % mod; } ll subr(ll a, ll b){ return ((1LL * a - b) % mod + mod) % mod; } string guess_sequence(int n){ string s = "ABXY"; int fir; if(press("AB") >= 1){ if(press("A") == 1) fir = 0; else fir = 1; } else{ if(press("X") == 1) fir = 2; else fir = 3; } string ans = ""; ans += s[fir]; for(int i = 1; i < n; i++){ int cnt = 0; for(int j = 0; j < 4; j++){ if(j == fir) continue; if(cnt == 2){ ans += s[j]; break; } int k = press(ans + s[j]); cnt++; if(k == i + 1){ ans += s[j]; break; } } } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...