제출 #945753

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
9457532024-03-14 07:22:43WongChun1234철로 (IOI14_rail)C++14
컴파일 에러
0 ms0 KiB
#include<bits/stdc++.h>
#include"rail.h"
using namespace std;
const int N=5050;
int dist[N][4],rf,rrf;
vector<pair<int,int>> srt,ans,l,r;
map<int,int> id;
void eat(int i,int pos,int ty){
//cerr<<i<<" at pos "<<pos<<" type "<<ty<<endl;
ans[i]={pos,ty};
id[pos]=i;
}
void find_location(int n, int first, int location[], int stype[]) {
int q=100000050;
ans.resize(n);
for (int i=-1000000;i<=1000000;i++) id[i]=5049;
for (int i=1;i<n;i++){
dist[i][0]=get_distance(0,i);
srt.push_back({dist[i][0],i});
}
sort(srt.begin(),srt.end());
rrf=rf=srt[0].second;
eat(0,0,1);
eat(rf,srt[0].first,2);
for (int i=1;i<n;i++){
if (i==rf) continue;
dist[i][1]=get_distance(rf,i);
if (dist[i][1]+dist[rf][0]==dist[i][0]){
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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

rail.cpp: In function 'void find_location(int, int, int*, int*)':
rail.cpp:20:14: error: 'get_distance' was not declared in this scope; did you mean 'getDistance'?
   20 |   dist[i][0]=get_distance(0,i);
      |              ^~~~~~~~~~~~
      |              getDistance
rail.cpp:29:14: error: 'get_distance' was not declared in this scope; did you mean 'getDistance'?
   29 |   dist[i][1]=get_distance(rf,i);
      |              ^~~~~~~~~~~~
      |              getDistance
rail.cpp:41:21: error: 'get_distance' was not declared in this scope; did you mean 'getDistance'?
   41 |   dist[i.second][2]=get_distance(rf,i.second);
      |                     ^~~~~~~~~~~~
      |                     getDistance
rail.cpp:65:22: error: 'get_distance' was not declared in this scope; did you mean 'getDistance'?
   65 |    dist[i.second][2]=get_distance(rf,i.second);
      |                      ^~~~~~~~~~~~
      |                      getDistance
rail.cpp:16:6: warning: unused variable 'q' [-Wunused-variable]
   16 |  int q=100000050;
      |      ^