제출 #986446

#제출 시각아이디문제언어결과실행 시간메모리
986446Yazan_SA철로 (IOI14_rail)C++14
컴파일 에러
0 ms0 KiB
#pragma once #include "bits/stdc++.h" #include "grader.h" using namespace std; // int getDistance(int i, int j); void findLocation(int n, int first, int location[], int stype[]) { stype[0]=1; location[0]=first; int mn=1e9,mni; for(int i=1; i<n; i++) { if(getDistance(0,i)<mn) mn=getDistance(0,i),mni=i; } stype[mni]=2; location[mni]=first+getDistance(0,mni); for(int i=1; i<n; i++) { if(i==mni)continue; if(getDistance(i,0)>getDistance(i,mni)) stype[i]=1,location[i]=location[mni]-getDistance(i,mni); else stype[i]=2,location[i]=first+getDistance(i,0); } return; }

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

rail.cpp:1:9: warning: #pragma once in main file
    1 | #pragma once
      |         ^~~~
rail.cpp:3:10: fatal error: grader.h: No such file or directory
    3 | #include "grader.h"
      |          ^~~~~~~~~~
compilation terminated.