Submission #650770

#TimeUsernameProblemLanguageResultExecution timeMemory
650770LitusianoCave (IOI13_cave)C++14
Compilation error
0 ms0 KiB
#include "cave.h" #include<bits/stdc++.h> using namespace std; void exploreCave(int N) { /* ... */ int v[N]; for(int i = 0; i<N; i++){ cin>>v[i]; } int idx = tryCombination(v); while(idx != -1;){ v[idx] ^= 1; idx = tryCombination(v); } int s[N]; for(int i = 0; i<N; i++) s[i] = i; answer(s,v); }

Compilation message (stderr)

cave.cpp: In function 'void exploreCave(int)':
cave.cpp:11:18: error: expected ')' before ';' token
   11 |   while(idx != -1;){
      |        ~         ^
      |                  )
cave.cpp:11:3: warning: this 'while' clause does not guard... [-Wmisleading-indentation]
   11 |   while(idx != -1;){
      |   ^~~~~
cave.cpp:11:19: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'while'
   11 |   while(idx != -1;){
      |                   ^
cave.cpp:11:19: error: expected primary-expression before ')' token