# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
432648 | daniel920712 | 도시들 (IOI15_towns) | C++14 | 236 ms | 388 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "towns.h"
#include <stdio.h>
#include <map>
#include <set>
using namespace std;
int all[205][205]={0};
map < int , int > tt;
int hubDistance(int N, int sub)
{
int i,j,k,ans=2e9,a,b,c,x,y,z;
for(i=0;i<N;i++)
{
for(j=i+1;j<N;j++) all[i][j]=all[j][i]=getDistance(i,j);
}
for(i=0;i<N;i++)
{
for(j=0;j<N;j++)
{
if(i==j) continue;
tt.clear();
for(k=j+1;k<N;k++)
{
a=all[i][j];
b=all[i][k];
c=all[j][k];
z=(a+b+c)/2-a;
y=(a+b+c)/2-b;
x=(a+b+c)/2-c;
tt[x]=max(tt[x],max(max(x,y),z));
}
for(auto k:tt)
{
//printf("%d %d %d\n",i,k.first,k.second);
ans=min(ans,k.second);
}
}
}
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... |