Submission #719140

#TimeUsernameProblemLanguageResultExecution timeMemory
719140mseebacherRail (IOI14_rail)C++17
Compilation error
0 ms0 KiB
#include "rail.h" #include <bits/stdc++.h> using namespace std; void findLocation(int N, int first, int location[], int stype[]) { stype[0] = 1; for(int i = 1;i<N;i++) stype[i] = 2; location[0] = first; for(int i = 1;i<n;i++){ location[i] = location[0] + (getDistance(0,i)>>1); } }

Compilation message (stderr)

rail.cpp: In function 'void findLocation(int, int, int*, int*)':
rail.cpp:11:18: error: 'n' was not declared in this scope
   11 |  for(int i = 1;i<n;i++){
      |                  ^