Submission #392334

#TimeUsernameProblemLanguageResultExecution timeMemory
392334ritul_kr_singhComputer Network (BOI14_network)C++17
25 / 100
139 ms8028 KiB
#include <bits/stdc++.h> using namespace std; // #define int long long #define sp << ' ' << #define nl << '\n' #include "network.h" void findRoute (int N, int a, int b){ int dist = ping(a, b); vector<int> at[dist]; for(int i=1; i<=N; ++i){ if(i == a or i == b) continue; int k = ping(a, i); if(k < dist) at[k].push_back(i); } for(int i=0; i<dist; ++i){ for(int j : at[i]){ if(i + 1 + ping(j, b) == dist){ travelTo(j); 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...