Submission #16056

#TimeUsernameProblemLanguageResultExecution timeMemory
16056tonyjjwComputer Network (BOI14_network)C++14
0 / 100
133 ms5220 KiB
#include<vector> #include "network.h" #define MN 1000 using namespace std; vector<int> A[MN+1]; int d[MN+1]; void findRoute(int N,int a,int b){ for(int i=1;i<=N;i++){ d[i]=ping(i,b)+1; if(i==b)d[i]=0; A[d[i]].push_back(i); } while(a!=b){ for(auto n:A[d[a]-1]){ if(ping(a,n)==0){ travelTo(n); a=n; break; } } } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...