Submission #1226753

#TimeUsernameProblemLanguageResultExecution timeMemory
1226753fauntleroyCombo (IOI18_combo)C++20
Compilation error
0 ms0 KiB
#include <iostream> #include <cstdio> #include <vector> #include <array> #include <string> #include <algorithm> #include <numeric> #include <map> #include <unordered_map> #include <set> #include <unordered_set> #include <queue> #include <cmath> #include <climits> #include <iomanip> #include <limits> #include <tuple> #include <stack> #include <bitset> #include <cstring> #include <sstream> #include <functional> #include <random> #define int long long using namespace std; string guess_sequence(int n) { string ans; for (int i = 0; i < n; ++i) { if (press(ans + "A")) ans.push_back('A'); if (press(ans + "B")) ans.push_back('B'); if (press(ans + "X")) ans.push_back('X'); if (press(ans + "Y")) ans.push_back('Y'); } }

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(long long int)':
combo.cpp:30:13: error: 'press' was not declared in this scope
   30 |         if (press(ans + "A"))
      |             ^~~~~
combo.cpp:32:13: error: 'press' was not declared in this scope
   32 |         if (press(ans + "B"))
      |             ^~~~~
combo.cpp:34:13: error: 'press' was not declared in this scope
   34 |         if (press(ans + "X"))
      |             ^~~~~
combo.cpp:36:13: error: 'press' was not declared in this scope
   36 |         if (press(ans + "Y"))
      |             ^~~~~
combo.cpp:39:1: warning: no return statement in function returning non-void [-Wreturn-type]
   39 | }
      | ^