제출 #341988

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

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

rail.cpp:3:37: error: 'vector' has not been declared
    3 | void findLocation(int N, int first, vector<int> location, vector<int> stype){
      |                                     ^~~~~~
rail.cpp:3:43: error: expected ',' or '...' before '<' token
    3 | void findLocation(int N, int first, vector<int> location, vector<int> stype){
      |                                           ^
rail.cpp: In function 'void findLocation(int, int, int)':
rail.cpp:5:3: error: 'location' was not declared in this scope
    5 |   location[i]=first+getDistance(0,i);
      |   ^~~~~~~~
rail.cpp:6:3: error: 'stype' was not declared in this scope
    6 |   stype[i]=2;
      |   ^~~~~
rail.cpp:8:2: error: 'stype' was not declared in this scope
    8 |  stype[0]=1;
      |  ^~~~~