Submission #1007124

#TimeUsernameProblemLanguageResultExecution timeMemory
1007124devariaotaCombo (IOI18_combo)C++17
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> /* Pragmaaa */ #pragma GCC optimize("Ofast") #pragma GCC optimize("unroll-loops") /* Primitive Data */ #define ll long long #define db double /* Pair Macro */ #define pii pair<int,int> #define pll pair<ll,ll> #define fi first #define sc second /* Vector Macro */ #define vi vector<int> #define vll vector<ll> #define pb push_back /* All Rounder */ #define all(x) x.begin(),x.end() #define forn(i,n) for(int (i) = 1; i<= int (n); i++) #define for0(i,n) for(int (i) = 0; i < int (n); i++) #define INF 1e9 #define LLINF 1e18 #define nl '\n' #define tab ' ' using namespace std; string guess_sequence(int N){ char a[9]; a[1] = 'A', a[2] = 'B', a[3] = 'X',a[4] = 'Y'; for(int i = 1; i<=4; i++)for(int j = 1; j<=4; j++)for(int k = 1; k<=4; k++){ string c =""; c+= a[i]; c+=a[j]; c+=a[k]; if(press(c) == 3){ return c; } } }

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:44:8: error: 'press' was not declared in this scope
   44 |     if(press(c) == 3){
      |        ^~~~~
combo.cpp:49:1: warning: control reaches end of non-void function [-Wreturn-type]
   49 | }
      | ^