Submission #104705

#TimeUsernameProblemLanguageResultExecution timeMemory
104705TAMREFComputer Network (BOI14_network)C++11
100 / 100
153 ms8080 KiB
#include "network.h" int dist[1005]; void findRoute (int N, int a, int b) { for(int i = 1; i <= N; i++) if(i != b) dist[i] = ping(i, b); dist[b] = -1; for(int now = a; now != b;){ for(int k = 1; k <= N; k++){ if(dist[k] + 1 == dist[now] && ping(k, now) == 0){ now = k; travelTo(k); break; } } } return; }

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