Submission #20821

#TimeUsernameProblemLanguageResultExecution timeMemory
20821jjwdi0Computer Network (BOI14_network)C++11
25 / 100
129 ms5112 KiB
#include "network.h" int A[1005]; int dist, B[1005][2]; void findRoute (int N, int a, int b) { dist = ping(a, b); for(int i=1; i<=N; i++) { if(i == a || i == b) continue; B[i][0] = ping(a, i), B[i][1] = ping(i, b); } for(int i=1; i<=N; i++) { if(i == a || i == b) continue; if(B[i][0] + B[i][1] + 1 == dist) A[B[i][0]] = i; } for(int i=0; i<dist; i++) travelTo(A[i]); travelTo(b); }

Compilation message (stderr)

grader.c: In function 'int main()':
grader.c:48:39: 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:41: 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...