Submission #5980

#TimeUsernameProblemLanguageResultExecution timeMemory
5980baneling100Computer Network (BOI14_network)C++98
0 / 100
120 ms5220 KiB
#include "network.h" #include <vector> using namespace std; vector <int> A[1001]; int Dist; void findRoute (int N, int a, int b) { int i, j, k; Dist=ping(a,b); for(i=1 ; i<=N ; i++) if(i!=a && i!=b) A[Dist-ping(i,b)].push_back(i); for(i=1 ; i<=Dist ; i++) { k=A[i].size(); for(j=0 ; j<k ; j++) if(ping(a,A[i][j])==0) { travelTo(A[i][j]); a=A[i][j]; break; } } travelTo(b); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...