답안 #76646

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
76646 2018-09-15T11:03:48 Z Vasiljko 컴퓨터 네트워크 (BOI14_network) C++14
0 / 100
194 ms 4416 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][cur];
        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]);
             ~~~~~^~~~~~~~~~~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Incorrect 125 ms 4344 KB Travelling to nonadjacent computer
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 115 ms 4344 KB Travelling to nonadjacent computer
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 178 ms 4416 KB Travelling to nonadjacent computer
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 194 ms 4416 KB Travelling to nonadjacent computer
2 Halted 0 ms 0 KB -