Submission #752889

#TimeUsernameProblemLanguageResultExecution timeMemory
752889125259Computer Network (BOI14_network)C++17
25 / 100
83 ms7848 KiB
#include "network.h" #include <bits/stdc++.h> using namespace std; void findRoute (int n, int a, int b){ int arr[n+1],arr1[n+1]; for(int i=1; i<=n; i++){ if(i==a or i==b) continue; arr[i]=ping(a,i); arr1[i]=ping(b,i); } int dist=ping(a,b); for(int i=0; i<dist; i++){ for(int j=1; j<=n; j++){ if(j==a or j==b)continue; if(arr[j]==i and arr1[j]==dist-1-i) travelTo(j); } } travelTo(b); /*int dist = ping(a, b); for (int i = 1; i <= dist; ++i) travelTo (i);*/ }

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