# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
787804 | vnm06 | Towns (IOI15_towns) | C++14 | 1 ms | 596 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "towns.h"
#include<bits/stdc++.h>
using namespace std;
int st[150][150];
int pitaj(int i, int j)
{
if(st[i][j]!=-1) return st[i][j];
st[i][j]=getDistance(i, j);
st[j][i]=st[i][j];
}
int hubDistance(int N, int sub)
{
int n=N;
memset(st, -1, sizeof(st));
for(int i=0; i<n; i++) st[i][i]=0;
int v1=0;
for(int i=1; i<n; i++)
{
if(pitaj(0, i)>pitaj(0, v1)) v1=i;
}
int v2=0;
for(int i=0; i<n; i++)
{
if(pitaj(v1, i)>pitaj(v1, v2)) v2=i;
}
int R=1e9;
for(int i=0; i<n; i++)
Compilation message (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... |