Submission #1006796

#TimeUsernameProblemLanguageResultExecution timeMemory
1006796GTACombo (IOI18_combo)C++17
Compilation error
0 ms0 KiB
#include "combo.h"
using namespace std;
string guess_sequence(int N) {
  n = N;
  vector<char> v(4) = {'A', 'B', 'X', 'Y'};
  fr(i, 0, 3) {
    fr(j, 0, 3) {
      fr(l, 0, 3) {
        string p = v[i] + v[j] + v[l];
        x = press(p);
        if (x == 3) {
          return p;
        }
      }
    }
  }
  return S;
}

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:4:3: error: 'n' was not declared in this scope
    4 |   n = N;
      |   ^
combo.cpp:5:3: error: 'vector' was not declared in this scope
    5 |   vector<char> v(4) = {'A', 'B', 'X', 'Y'};
      |   ^~~~~~
combo.cpp:2:1: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'?
    1 | #include "combo.h"
  +++ |+#include <vector>
    2 | using namespace std;
combo.cpp:5:10: error: expected primary-expression before 'char'
    5 |   vector<char> v(4) = {'A', 'B', 'X', 'Y'};
      |          ^~~~
combo.cpp:6:6: error: 'i' was not declared in this scope
    6 |   fr(i, 0, 3) {
      |      ^
combo.cpp:6:3: error: 'fr' was not declared in this scope
    6 |   fr(i, 0, 3) {
      |   ^~
combo.cpp:17:10: error: 'S' was not declared in this scope
   17 |   return S;
      |          ^