Submission #16055

#TimeUsernameProblemLanguageResultExecution timeMemory
16055tonyjjwComputer Network (BOI14_network)C++14
Compilation error
0 ms0 KiB
#include<vector> #define MN 1000 using namespace std; vector<int> A[MN+1]; int d[MN+1]; void findRoute(int N,int a,int b){ for(int i=1;i<=N;i++){ d[i]=ping(i,b)+1; if(i==b)d[i]=0; A[d[i]].push_back(i); } while(a!=b){ for(auto n:A[d[a]-1]){ if(ping(a,n)==0){ travelTo(n); a=n; break; } } } }

Compilation message (stderr)

network.cpp: In function ‘void findRoute(int, int, int)’:
network.cpp:11:18: error: ‘ping’ was not declared in this scope
     d[i]=ping(i,b)+1;
                  ^
network.cpp:17:18: error: ‘ping’ was not declared in this scope
       if(ping(a,n)==0){
                  ^
network.cpp:18:19: error: ‘travelTo’ was not declared in this scope
         travelTo(n);
                   ^
grader.c: In function ‘int main()’:
grader.c:48:39: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
     scanf ("%d%d%d%d", &N, &a, &b, &M);
                                       ^
grader.c:51:41: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
             scanf("%d", &distance[u][v]);
                                         ^