Submission #1006808

#TimeUsernameProblemLanguageResultExecution timeMemory
1006808GTACombo (IOI18_combo)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
#include "combo.h"
using namespace std;
#define fr(m,n,k) for(int m=n;m<=k;m++)

int n;
string guess_sequence(int N) {
  string v = "ABXY";
  fr(i, 0, 3) {
    fr(j, 0, 3) {
      fr(l, 0, 3) {
        string p;
        string p += v[i];
        string p += v[j];
        string p += v[l];
        int x = press(p);
        if (x == 3) {
          return p;
        }
      }
    }
  }
}

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:13:18: error: expected initializer before '+=' token
   13 |         string p += v[i];
      |                  ^~
combo.cpp:14:18: error: expected initializer before '+=' token
   14 |         string p += v[j];
      |                  ^~
combo.cpp:15:18: error: expected initializer before '+=' token
   15 |         string p += v[l];
      |                  ^~
combo.cpp:8:14: warning: control reaches end of non-void function [-Wreturn-type]
    8 |   string v = "ABXY";
      |              ^~~~~~