제출 #1314902

#제출 시각아이디문제언어결과실행 시간메모리
1314902channk컴퓨터 네트워크 (BOI14_network)C++20
0 / 100
1096 ms4200 KiB
#include "network.h" #include <vector> #include <stack> using namespace std; void findRoute (int N, int a, int b) { vector<int> arr(1005); for(int i=1;i<N;i++){ if(i!=a && i!=b) arr[i] = ping(a,i)+1; } stack<int> stk; int curr = b; while(curr!=a){ for(int i=1;i<N;i++){ if(arr[i]+1==arr[curr] && ping(curr,i)==0){ curr = i; stk.push(i); } } } while(!stk.empty()){ travelTo(stk.top()); stk.pop(); } }

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