Submission #903880

#TimeUsernameProblemLanguageResultExecution timeMemory
903880zhasynCombo (IOI18_combo)C++14
10 / 100
40 ms1476 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 ans = ""; string s = "ABXY"; int fir = -1; for(int i = 0; i < n; i++){ for(int j = 0; j < 4; j++){ if(fir == j) continue; int res = press(ans + s[j]); if(res == i + 1){ if(i == 0) fir = j; ans += s[j]; break; } } } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...