Submission #552301

#TimeUsernameProblemLanguageResultExecution timeMemory
552301qadeptraiCombo (IOI18_combo)C++14
10 / 100
53 ms480 KiB
#include <bits/stdc++.h> #define oo 10000000000007 #define sci(x) scanf("%d", &x) #define scii(x, y) scanf("%d %d", &x, &y) #define pri(x) printf("%d ", x) #define pril(x) printf("%d\n", x) #define ii pair<int, int> #define ff first #define ss second #define vi vector<int> #define vii vector<ii> #define pb push_back #define mp make_pair #define ll long long #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 maxN 100005 using namespace std; int n, m; char a[] = {'A', 'B', 'X', 'Y'}; int press(string s); string guess_sequence(int n) { string s = " "; fto(i, 0, 3) { s[0] = a[i]; // cout << s << endl; if(press(s) == 1) break; } char first = s[0]; fto(i, 1, n-1) { s = s + ' '; fto(j, 0, 3) { if(a[j] == first) continue; s[i] = a[j]; int coin = press(s); if(coin == i+1) { break; } } } return s; } //int main() { // cin >> n; // cout << guess_sequence(n); // // //}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...