Submission #161866

# Submission time Handle Problem Language Result Execution time Memory
161866 2019-11-05T01:20:27 Z AQT Computer Network (BOI14_network) C++14
0 / 100
123 ms 8056 KB
#include <bits/stdc++.h>
#include "network.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);
}

Compilation message

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]);
             ~~~~~^~~~~~~~~~~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Incorrect 123 ms 8056 KB Travelling to nonadjacent computer
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 108 ms 6776 KB Travelling to nonadjacent computer
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 107 ms 6776 KB Travelling to nonadjacent computer
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 109 ms 7056 KB Travelling to nonadjacent computer
2 Halted 0 ms 0 KB -