This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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];
cout <<"press(" << s <<")" << endl;
int t; cin >> t;
if (t > cnt) {
cnt = t;
break;
}
s.pop_back();
}
}
return s;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |