Submission #92958

#TimeUsernameProblemLanguageResultExecution timeMemory
92958beso123Combo (IOI18_combo)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "combo.h" using namespace std; string guess_sequence(int N){ if(press("A")==1) s="A"; if(press("B")==1) s="B"; if(press("X")==1) s="X"; if(press("Y")==1) s="Y"; return s; }

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:8:5: error: 's' was not declared in this scope
    8 |     s="A";
      |     ^
combo.cpp:10:5: error: 's' was not declared in this scope
   10 |     s="B";
      |     ^
combo.cpp:9:1: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
    9 | if(press("B")==1)
      | ^~
combo.cpp:11:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
   11 |     if(press("X")==1)
      |     ^~
combo.cpp:12:5: error: 's' was not declared in this scope
   12 |     s="X";
      |     ^
combo.cpp:14:5: error: 's' was not declared in this scope
   14 |     s="Y";
      |     ^
combo.cpp:15:8: error: 's' was not declared in this scope
   15 | return s;
      |        ^