Submission #1280813

#TimeUsernameProblemLanguageResultExecution timeMemory
1280813cuervo2320Combo (IOI18_combo)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "combo.h" using namespace std; // typedef ******************************************** typedef long long ll; typedef pair<int, int> ii; typedef pair<int,pair<int,int>> iii; typedef map<int, int> mp; typedef map<int, string> mps; typedef vector<int> vi; typedef vector<string> vs; typedef vector<long long> vll; typedef vector<vector<int>> vvi; typedef vector<vector<ii>> vvii; // definiciones **************************************** #define s second #define f first #define pb push_back #define sz(x) (int)(x.size()) #define all(x) x.begin(), x.end() #define FOR(i, n) for (int i = 0; i < n; i++) #define YES cout << 'Y' << 'E' << 'S' << endl; #define NO cout << 'N' << 'O' << endl; void setIO() { ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); // freopen(" .in","r",stdin); // freopen(" .out","w",stdout); } // grafos ********************************************** vector<vector<pair<int, int>>> leergraph(int n, int m) { vector<vector<pair<int, int>>> adj(n + 1); for (int i = 0; i < m; ++i) { int u, v, w; cin >> u >> v >> w; adj[u].push_back({v, w}); } return adj; } /* void dfs(int u) { vector<bool> visitado; visitado[u] = true; for (int i = 0; i < adj[u].size(); i++) { int v = adj[u][i].first; int w = adj[u][i].second; if (!visitado[v]) dfs(v); } } */ // inicio *********************************************** string guess_sequence(int N) { string ans = ""; string letters = "ABXY"; for (char c : letters) { string t(1, c); if (press(t) == 1) { ans += c; break; } } for (int i = 1; i < N; ++i) { for (char c : letters) { string t = ans + c; if (press(t) == i + 1) { ans += c; break; } } } guess(ans); return ans; }

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:81:5: error: 'guess' was not declared in this scope
   81 |     guess(ans);
      |     ^~~~~