Submission #1314846

#TimeUsernameProblemLanguageResultExecution timeMemory
1314846Zone_zoneeComputer Network (BOI14_network)C++20
0 / 100
49 ms4324 KiB
#include <bits/stdc++.h> #include "network.h" void findRoute (int N, int a, int b) { using namespace std; vector<int> dist[N]; for(int i = 1; i <= N; ++i){ if(i != b) dist[ping(b, i)].push_back(i); } int u = a; int d = ping(a, b); while(u != b){ for(int v : dist[d-1]){ if(ping(u, v) == 0){ d--; u = v; travelTo(v); break; } } } }

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...