Submission #719141

#TimeUsernameProblemLanguageResultExecution timeMemory
719141mseebacherRail (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:9:18: error: 'N' was not declared in this scope
    9 |  for(int i = 1;i<N;i++) stype[i] = 2;
      |                  ^