Submission #74200

# Submission time Handle Problem Language Result Execution time Memory
74200 2018-08-30T12:43:59 Z MKopchev Towns (IOI15_towns) C++14
Compilation error
0 ms 0 KB
#include<bits/stdc++.h>
using namespace std;
const int nmax=1e2+42;
int dist[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]=max(dist[i],d);
        dist[j]=max(dist[j],d);
        }
    int mini=dist[0];
    for(int i=1;i<N;i++)
    {
        mini=min(mini,dist[i]);
    }
    return mini;
}

Compilation message

towns.cpp: In function 'int hubDistance(int, int)':
towns.cpp:10:15: error: 'getDistance' was not declared in this scope
         int d=getDistance(i,j);
               ^~~~~~~~~~~
towns.cpp:10:15: note: suggested alternative: 'hubDistance'
         int d=getDistance(i,j);
               ^~~~~~~~~~~
               hubDistance
towns.cpp:5:27: warning: unused parameter 'sub' [-Wunused-parameter]
 int hubDistance(int N,int sub)
                           ^~~