Submission #552290

#TimeUsernameProblemLanguageResultExecution timeMemory
552290pckienCombo (IOI18_combo)C++17
Compilation error
0 ms0 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; 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); if (t > cnt) { cnt = t; break; } s.pop_back(); } } return s; }

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:41:21: error: 'press' was not declared in this scope
   41 |             int t = press(s);
      |                     ^~~~~