| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 410062 | definitelynotmee | 도시들 (IOI15_towns) | C++98 | 20 ms | 952 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
//#include "towns.h"
#define mp make_pair
#define mt make_tuple
#define ff first
#define ss second
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
const ll INFL = (1LL<<62)-1;
const int INF = (1<<30)-1;
const int MAXN = 0;
int getDistance(int i, int j);
int hubDistance(int n, int sub){
vector<int> ds (n,0), db(n,0), da(n,-1);
int a = 0, b;
int maxi = -1;
for(int i = 1; i < n; i++){
ds[i] = getDistance(0,i);
if(ds[i] > maxi)
maxi = ds[i], b = i;
}
maxi = ds[b];
db[0] = ds[b];
for(int i = 1; i < n; i++){
if(i==b)
continue;
db[i] = getDistance(b,i);
if(db[i] > maxi)
maxi = db[i], a = i;
}
da[a] = 0;
da[b] = db[a];
da[0] = ds[a];
vector<int> dlca(n,0), v(n,0);
int resp = INF;
for(int i = 0; i < n; i++){
dlca[i] = (db[0] + db[i] - ds[i])>>1;
resp = min(resp, max(dlca[i], db[a] - dlca[i]));
}
return resp;
}컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
