Submission #76647

# Submission time Handle Problem Language Result Execution time Memory
76647 2018-09-15T11:04:33 Z Vasiljko Computer Network (BOI14_network) C++14
100 / 100
172 ms 47680 KB
#include <bits/stdc++.h>
#include "network.h"
using namespace std;

typedef long long ll;
const ll MOD = 1e9+7;
const int N = 1005;

vector<int>v[N];

void findRoute(int n,int a,int b){
    int dist=ping(a,b);

    for(int i=1;i<=n;i++){
        if(i!=a&&i!=b)v[ping(i,b)].push_back(i);
    }
    int cur=a;
    dist--;
    while(dist>=0){
        int i=0;
        while(ping(v[dist][i],cur)!=0)i++;

        cur=v[dist][i];
        dist--;
        travelTo(cur);
    }
    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 Correct 123 ms 4344 KB Output is correct
2 Correct 124 ms 7540 KB Output is correct
3 Correct 109 ms 10400 KB Output is correct
4 Correct 110 ms 13444 KB Output is correct
5 Correct 108 ms 15976 KB Output is correct
6 Correct 113 ms 18424 KB Output is correct
7 Correct 2 ms 18424 KB Output is correct
8 Correct 2 ms 18424 KB Output is correct
9 Correct 2 ms 18424 KB Output is correct
10 Correct 2 ms 18424 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 110 ms 18424 KB Output is correct
2 Correct 30 ms 18424 KB Output is correct
3 Correct 123 ms 22548 KB Output is correct
4 Correct 107 ms 24484 KB Output is correct
5 Correct 129 ms 28232 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 111 ms 28232 KB Output is correct
2 Correct 28 ms 28232 KB Output is correct
3 Correct 130 ms 32276 KB Output is correct
4 Correct 101 ms 34256 KB Output is correct
5 Correct 138 ms 38004 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 110 ms 38004 KB Output is correct
2 Correct 33 ms 38004 KB Output is correct
3 Correct 135 ms 42100 KB Output is correct
4 Correct 101 ms 43996 KB Output is correct
5 Correct 172 ms 47680 KB Output is correct