제출 #1085357

#제출 시각아이디문제언어결과실행 시간메모리
1085357guagua0407정렬하기 (IOI15_sorting)C++17
컴파일 에러
0 ms0 KiB
#include "towns.h" #include <bits/stdc++.h> using namespace std; #define ll long long #define pii pair<int,int> #define f first #define s second #define all(x) x.begin(),x.end() #define _ ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int hubDistance(int N, int sub) { int n=N; vector<int> dis(n); for(int i=0;i<n;i++){ dis[i]=getDistance(0,i); } int x=max_element(all(dis))-dis.begin(); for(int i=0;i<n;i++){ dis[i]=getDistance(x,i); } int y=max_element(all(dis))-dis.begin(); vector<int> dis2(n); for(int i=0;i<n;i++){ dis2[i]=getDistance(y,i); } vector<int> vec; for(int i=0;i<n;i++){ vec.push_back(dis[i]-(dis[i]+dis2[i]-dis[y])/2); } sort(all(vec)); int R=dis[y]; int ans=R; for(auto v:vec){ ans=min(ans,max(v,R-v)); } return ans; }

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

sorting.cpp:1:10: fatal error: towns.h: No such file or directory
    1 | #include "towns.h"
      |          ^~~~~~~~~
compilation terminated.