| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 965988 | AdamGS | 도시들 (IOI15_towns) | C++17 | 10 ms | 1112 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "towns.h"
#include<bits/stdc++.h>
using namespace std;
#define rep(a, b) for(int a = 0; a < (b); ++a)
#define st first
#define nd second
#define pb push_back
#define all(a) a.begin(), a.end()
int hubDistance(int n, int sub) {
vector<int>A(n), B(n), C(n);
pair<int,int>ma={0, 0};
for(int i=1; i<n; ++i) {
A[i]=getDistance(0, i);
ma=max(ma, {A[i], i});
}
int x=ma.nd;
B[0]=ma.st;
for(int i=1; i<n; ++i) if(i!=x) B[i]=getDistance(x, i);
rep(i, n) C[i]=B[i]-(A[i]+B[i]-B[0])/2;
ma={0, 0};
rep(i, n) ma=max(ma, {B[i], i});
int y=ma.nd;
int ans=max(C[y], B[y]-C[y]);
return ans;
}컴파일 시 표준 에러 (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... | ||||
