제출 #1342636

#제출 시각아이디문제언어결과실행 시간메모리
1342636yc11Computer Network (BOI14_network)C++20
25 / 100
52 ms4364 KiB
#include<bits/stdc++.h>
#include "network.h"
using namespace std;
void findRoute (int N, int a, int b)
{
    int d = ping(a,b);
 
    int d1 = 0;
    vector<int> hi;
    hi.assign(N+1,0);
    hi[a] = 1;
    int c = a;
    while (true){
    for (int i = 0;i<N;i++){
        if (hi[i+1]==0 and ping(c,i+1)==0){
            if (ping(i+1,b)==d-1){
                hi[i+1] = 1;
                travelTo(i+1);
                d--;
                c = i+1;
            
                if (d==0){travelTo(b);return;}
                break;
            }


        }
    }
    }
}

컴파일 시 표준 에러 (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...