# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
74221 | 2018-08-30T13:40:35 Z | MKopchev | Towns (IOI15_towns) | C++14 | 1000 ms | 588 KB |
#include<bits/stdc++.h> #include "towns.h" using namespace std; const int nmax=1e2+42; int dist[nmax][nmax]; int hubDistance(int N,int sub) { for(int i=0;i<N;i++) for(int j=i+1;j<N;j++) { int d=getDistance(i,j); dist[i][j]=d; dist[j][i]=d; } int p=0,q=0; for(int i=0;i<N;i++) for(int j=i+1;j<N;j++) if(dist[p][q]<dist[i][j])p=i,j=q; int mini=1e9; for(int k=0;k<N;k++) { int n1=(dist[p][q]+dist[k][p]-dist[k][q])/2; mini=min(mini,max(n1,dist[p][q]-n1)); } return mini; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1079 ms | 256 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 372 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1069 ms | 448 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 468 KB | Output isn't correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1068 ms | 512 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 588 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |