제출 #421754

#제출 시각아이디문제언어결과실행 시간메모리
421754Andyvanh1철로 (IOI14_rail)C++14
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #include "rail.h" using namespace std; #define vt vector #define pb push_back #define all(x) (x).begin(),(x).end() #define rep(i,x) for(int (i) = 0; (i) < (x); (i)++) #define INF 0x3f3f3f3f #define MOD 1000000007 typedef long long ll; typedef long double ld; typedef vt<int> vi; typedef pair<int,int> pii; int dist[102][102]; void findLocation(int n,int first, int location[], int stype[]){ for(int i = 0; i < n; i++){ for(int j = 0; j < n; j++){ dist[i][j] = GetDistance(i,j); } } location[0] = first; stype[0] = 1; int c = -1; int MinDist = INF; for(int i =1; i < n; i++){ if(dist[0][i]<MinDist){ MinDist = dist[0][i]; c = i; } } location[c] = first+dist[0][c]-1; stype[c] = 2; for(int i = 1; i < n; i++){ if(i==c)continue; if(dist[0][i]-dist[c][i]==dist[0][c]-1){ location[i] = location[c]-dist[c][i]+1; stype[i] = 1; }else{ location[i] = first + dist[0][i]-1; stype[i] = 2; } } }

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

rail.cpp: In function 'void findLocation(int, int, int*, int*)':
rail.cpp:25:26: error: 'GetDistance' was not declared in this scope; did you mean 'getDistance'?
   25 |             dist[i][j] = GetDistance(i,j);
      |                          ^~~~~~~~~~~
      |                          getDistance