Submission #696441

#TimeUsernameProblemLanguageResultExecution timeMemory
696441Elvin_FritlCombo (IOI18_combo)C++17
Compilation error
0 ms0 KiB
#include "combo.h"
using namespace std;
string guess_sequence(int n) {
  string p = "";
  string s="ABXY"
  for(int i=0;i<n;i++){
     for(int j=0;j<4;j++){
        string p1=p+s[j];
        if(press(p1)==p1.size()){
            p=p1;
            break;
        }
     }
  }
  return p;
}

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:6:3: error: expected ',' or ';' before 'for'
    6 |   for(int i=0;i<n;i++){
      |   ^~~
combo.cpp:6:15: error: 'i' was not declared in this scope
    6 |   for(int i=0;i<n;i++){
      |               ^