제출 #204555

#제출 시각아이디문제언어결과실행 시간메모리
204555awlintqaa철로 (IOI14_rail)C++14
컴파일 에러
0 ms0 KiB
#define fast ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0) #include <bits/stdc++.h> using namespace std; #define sqr 200 #define mid (l+r)/2 #define pb push_back #define ppb pop_back #define fi first #define se second #define lb lower_bound #define ub upper_bound #define ins insert #define era erase #define C continue #define mem(dp,i) memset(dp,i,sizeof(dp)) #define mset multiset typedef long long ll; typedef short int si; typedef long double ld; typedef pair<int,int> pi; typedef pair<ll,ll> pll; typedef vector<int> vi; typedef vector<ll> vll; typedef vector<pi> vpi; typedef vector<pll> vpll; const ll mod=1e9+7; const ll inf= 4e18; const ld pai=acos(-1); #include "rail.h" int n,st; vi v; int dis[5009][5009]; int done[5009]; void findLocation(int N, int first, int location[], int stype[]){ n=N,st=first; location[0]=st,stype[0]=1; if(n==1)return; done[0]=1; for(int i=0;i<n;i++){ for(int j=i+1;j<n;j++){ dis[i][j]=getDistcane(i,j); dis[j][i]=getDistance(j,i); if(dis[i][j]!=dis[j][i]){ while(1){ } } } } int en=1e9,id=-1; for(int i=1;i<n;i++){ if(dis[0][i]<en){ en=dis[0][i]; id=i; } } location[id]=st+en,stype[id]=2; done[id]=1; v.pb(id); for(int i=1;i<n;i++){ if(i==id)C; if(dis[0][i] != dis[0][id]+dis[id][i] ){ v.pb(i); done[i]=1; location[i]=dis[0][i]+st; stype[i]=2; } } for(int i=0;i<n;i++){ if(done[i])C; for(auto u:v){ if(dis[0][i]==dis[0][u]+dis[u][i]){ location[i]=location[u]-dis[u][i]; stype[i]=1; } } } }

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

rail.cpp: In function 'void findLocation(int, int, int*, int*)':
rail.cpp:41:35: error: 'getDistcane' was not declared in this scope
                         dis[i][j]=getDistcane(i,j);
                                   ^~~~~~~~~~~
rail.cpp:41:35: note: suggested alternative: 'getDistance'
                         dis[i][j]=getDistcane(i,j);
                                   ^~~~~~~~~~~
                                   getDistance