Submission #161864

# Submission time Handle Problem Language Result Execution time Memory
161864 2019-11-05T01:14:33 Z AQT Computer Network (BOI14_network) C++14
Compilation error
0 ms 0 KB
#include <bits/stdc++.h>

using namespace std;

vector<int> dist[1005];

void findRoute(int N, int A, int B){
    int D = ping(A, B)+1;
    for(int n = 1; n<=N; n++){
        if(n != A && n != B){
            int k = ping(A, B);
            dist[k+1].push_back(n);
        }
    }
    int crnt = A;
    for(int d = D-1; d; d--){
        for(int n : dist[d]){
            if(ping(crnt, n) == 0){
                crnt = n;
                travelTo(n);
                break;
            }
        }
    }
    travelTo(B);
}

int main(){

}

Compilation message

network.cpp: In function 'void findRoute(int, int, int)':
network.cpp:8:13: error: 'ping' was not declared in this scope
     int D = ping(A, B)+1;
             ^~~~
network.cpp:8:13: note: suggested alternative: 'uint'
     int D = ping(A, B)+1;
             ^~~~
             uint
network.cpp:20:17: error: 'travelTo' was not declared in this scope
                 travelTo(n);
                 ^~~~~~~~
network.cpp:25:5: error: 'travelTo' was not declared in this scope
     travelTo(B);
     ^~~~~~~~
grader.c: In function 'int main()':
grader.c:48:11: 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:18: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
             scanf("%d", &distance[u][v]);
             ~~~~~^~~~~~~~~~~~~~~~~~~~~~~