제출 #733352

#제출 시각아이디문제언어결과실행 시간메모리
733352Trunkty컴퓨터 네트워크 (BOI14_network)C++14
100 / 100
115 ms8012 KiB
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
//#define int ll

#include "network.h"

int arr[1005];
vector<int> dist[1005];

void findRoute(int n, int a, int b){
    for(int i=1;i<=n;i++){
        if(i!=b){
            arr[i] = ping(b,i);
            dist[arr[i]].push_back(i);
        }
    }
    dist[0].push_back(b);
    for(int i=arr[a]-1;i>=0;i--){
        for(int j:dist[i]){
            if(ping(a,j)==0){
                a = j;
                travelTo(j);
                break;
            }
        }
    }
    travelTo(b);
}

컴파일 시 표준 에러 (stderr) 메시지

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]
   48 |     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]
   51 |             scanf("%d", &distance[u][v]);
      |             ~~~~~^~~~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...