Submission #752448

#TimeUsernameProblemLanguageResultExecution timeMemory
752448jamezzzComputer Network (BOI14_network)C++17
100 / 100
116 ms7808 KiB
#include "network.h" int d[1005]; void findRoute (int N,int a,int b){ int cur=a; for(int i=1;i<=N;++i)d[i]=i==b?-1:ping(i,b); while(cur!=b){ for(int i=1;i<=N;++i){ if(d[i]==d[cur]-1&&ping(cur,i)==0){ travelTo(i); cur=i; 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...