제출 #552305

#제출 시각아이디문제언어결과실행 시간메모리
552305qadeptrai콤보 (IOI18_combo)C++14
10 / 100
67 ms588 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; int press(string p); // cout << p << endl; // int res; cin >> res; // return res; //} string guess_sequence(int n) { string p = "A"; char a[] = {'A', 'B', 'X', 'Y'}; int s = 0; while (1) { int x = press(p); if (x == 1) { swap(a[s], a[3]); break; } ++s; p = a[s]; } string S = p; fto(i, 2, n) { int j = 0; p = S + a[j]; while (press(p) != i) { ++j; p = S + a[j]; } S = p; } return S; } //int main() { // sci(n); // // cout << guess_sequence(n); // // return 0; //}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...