Submission #975593

#TimeUsernameProblemLanguageResultExecution timeMemory
975593yeediotCombo (IOI18_combo)C++17
Compilation error
0 ms0 KiB
#include "combo.h" #include<bits/stdc++.h> using namespace std; #define F first #define S second #define all(x) x.begin(),x.end() #define pii pair<int,int> #define pb push_back #define sz(x) (int)(x.size()) #define chmin(x,y) x=min(x,y) #define chmax(x,y) x=max(x,y) #define vi vector<int> #define vp vector<pii> #define vvi vector<vi> #define ykh mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count()) #define __lg(x) 63-__builtin_clzll(x) #define pow2(x) (1LL<<x) string guess_sequence(int n){ string s; vector<char>v={'A','B','X','Y'}; for(int j=0;j<4;j++){ for(int i=0;i<n;i++){ if(j==0)s+=v[j]; else s[i]=v[j]; } int x=guess(s); if(x==1){ break; } } for(int i=1;i<n;i++){ for(int j=0;j<4;j++){ s[i]=v[j]; int x=press(s); if(x==i+1){ break; } } } return s; } /* input: */

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:26:15: error: 'guess' was not declared in this scope
   26 |         int x=guess(s);
      |               ^~~~~