Submission #305516

#TimeUsernameProblemLanguageResultExecution timeMemory
305516amunduzbaevCombo (IOI18_combo)C++14
Compilation error
0 ms0 KiB
#include "combo.h"
#include <bits/stdc++.h>

using namespace std;

string guess_sequence(int n) {
  string p = "";
  string s="ABXY";
      for(int i=2;i<=n;i++){
        for(int j=0;j<4;j++){
            if(press((p+s[j]))==i){
                p+=s[j];
                break;
            }
        }
        }
      }

  return p;
}

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:17:7: warning: no return statement in function returning non-void [-Wreturn-type]
   17 |       }
      |       ^
combo.cpp: At global scope:
combo.cpp:19:3: error: expected unqualified-id before 'return'
   19 |   return p;
      |   ^~~~~~
combo.cpp:20:1: error: expected declaration before '}' token
   20 | }
      | ^