Submission #527263

#TimeUsernameProblemLanguageResultExecution timeMemory
527263Hydroxic_AcidOn the Grid (FXCUP4_grid)C++17
Compilation error
0 ms0 KiB
#include "grid.h" #include <vector> using namespace std; vector<int> SortDisks(int N) { vector<int> v; int last = N - 1; for(int i = 0; i < N; i++) v.push_back(i); int X = PutDisks(v); while(X > N){ int cnt = 0; while(X < last + N){ int temp = v[cnt]; v[cnt] = v[last]; v[last] = temp; cnt++ } last--; } return v; }

Compilation message (stderr)

grid.cpp: In function 'std::vector<int> SortDisks(int)':
grid.cpp:16:9: error: expected ';' before '}' token
   16 |    cnt++
      |         ^
      |         ;
   17 |   }
      |   ~