제출 #1160771

#제출 시각아이디문제언어결과실행 시간메모리
1160771SmuggingSpun철로 (IOI14_rail)C++20
컴파일 에러
0 ms0 KiB
#include<bits/stdc++.h> #include "rail.h" using namespace std; void findLocation(int N, int first, int location[], int stype[]){ location[0] = first; stype[0] = 1; fill(stype + 1, stype + N, 2); for(int i = 1; i < n; i++){ location[i] = first + getDistance(0, i); } }

컴파일 시 표준 에러 (stderr) 메시지

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