제출 #1314837

#제출 시각아이디문제언어결과실행 시간메모리
1314837Zone_zoneeComputer Network (BOI14_network)C++20
25 / 100
50 ms4268 KiB
#include <bits/stdc++.h> #include "network.h" void findRoute (int N, int a, int b) { using namespace std; int dist = ping(a, b); priority_queue<pair<int, int>> ans; for(int i = 1; i <= N; ++i){ if(i == a || i == b) continue; int da = ping(a, i), db = ping(i, b); if(da + db + 1 == dist){ ans.push({-da, i}); } } while(!ans.empty()){ auto [d, u] = ans.top(); ans.pop(); // cerr << u << '\n'; travelTo(u); } 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...