Submission #552306

#TimeUsernameProblemLanguageResultExecution timeMemory
552306pckienCombo (IOI18_combo)C++17
10 / 100
75 ms448 KiB
#include <bits/stdc++.h> #define vi vector<int> #define ii pair<int, int> #define vii vector<ii> #define pb push_back #define mp make_pair #define ff first #define ss second #define sz(a) (int)a.size() #define sci(a) scanf("%d", &a) #define scii(a, b) scanf("%d %d", &a, &b) #define pri(a) printf("%d ", a) #define pril(a) printf("%d\n", a) #define fto(i, a, b) for(int i = a; i <= b; ++i) #define fdto(i, a, b) for(int i = a; i >= b; --i) #define oo 1000000007 #define maxN 10005 using namespace std; int press(string p); string guess_sequence(int N) { string s; char mov[5]; mov[1] = 'X'; mov[2] = 'Y'; mov[3] = 'A'; mov[4] = 'B'; int cnt = 0; fto (i, 1, N) { fto (j, 1, 4) { s += mov[j]; int t = press(s); fflush(stdout); if (t > cnt) { cnt = t; break; } s.pop_back(); } } return s; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...