Submission #1007348

#TimeUsernameProblemLanguageResultExecution timeMemory
1007348LudisseyComputer Network (BOI14_network)C++14
0 / 100
76 ms11708 KiB
#include "network.h" #include <bits/stdc++.h> #define sz(a) (int)a.size() #define all(a) a.begin(), a.end() using namespace std; void findRoute (int N, int a, int b) { int d=ping(a,b); vector<vector<int>> prox(d); for (int i = 1; i <= N; i++) { if(i!=a&&i!=b) { prox[ping(i,b)].push_back(i); } } int x=a; for (int i = d-1; i >= 0; i--){ for (auto u : prox[i]) { if(ping(x,u)==0) { x=u; travelTo(x); break;} } } travelTo(b); }

Compilation message (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...