Submission #218280

#TimeUsernameProblemLanguageResultExecution timeMemory
218280dolphingarlicComputer Network (BOI14_network)C++14
100 / 100
118 ms4508 KiB
#include"network.h" #include<vector> int d[1001];std::vector<int> f[1001];void findRoute(int N, int a, int b) {for(;N;N--){if(N==b)continue;d[N]=ping(N,b);f[d[N]].push_back(N);}for(N=d[a];N;N--)for(int j:f[N-1])if(!ping(a,j)){travelTo(j);a=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]
     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...