제출 #298902

#제출 시각아이디문제언어결과실행 시간메모리
298902lakshith_철로 (IOI14_rail)C++14
컴파일 에러
0 ms0 KiB
#include "rail.h"

void findLocation(int N, int first, int location[], int stype[]){
    for(int i=1;i<n;i++){
        location[i] = getDistance(0,i)+first;
        stype[i]=2;
    }
    location[0]=first;
    stype[0]=1;
}

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

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