# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
432605 | daniel920712 | Towns (IOI15_towns) | C++14 | 24 ms | 964 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 <iostream>
using namespace std;
int all[205][205]={0};
int hubDistance(int N, int sub)
{
int i,j,k,ans=0,a,b,c;
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=i+1;j<N;j++)
{
for(k=j+1;k<N;k++)
{
a=all[i][j];
b=all[i][k];
c=all[j][k];
ans=max(ans,(a+b+c)/2-a);
ans=max(ans,(a+b+c)/2-b);
ans=max(ans,(a+b+c)/2-c);
}
}
}
return ans;
}
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... |