# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
617472 | chirathnirodha | Towns (IOI15_towns) | C++17 | 15 ms | 1096 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;
#define PB push_back
#define F first
#define S second
int hubDistance(int N, int sub) {
int n=N;
pair<int,int> maxdis={-1,-1};
for(int i=1;i<n;i++){
int x=getDistance(0,i);
if(x>maxdis.F)maxdis={x,i};
}
int y=maxdis.F;
for(int i=1;i<n;i++){
if(i==y)continue;
int x=getDistance(y,i);
if(x>maxdis.F)maxdis={x,i};
}
return (maxdis.F+1)/2;
}
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... |