Submission #16034

#TimeUsernameProblemLanguageResultExecution timeMemory
16034hongjun7Computer Network (BOI14_network)C++98
25 / 100
150 ms5084 KiB
#include "network.h" int da[2005], db[2005]; void findRoute(int N, int a, int b) { int dist = ping(a, b); for (int i = 1; i <= N; i++) if (i != a) da[i] = ping(a, i); for (int i = 1; i <= N; i++) if (i != b) db[i] = ping(b, i); for (int i = 1; i <= dist; ++i) { for (int j = 1; j <= N; j++) { if (j != a && da[j] == i - 1 && db[j] == dist - i) { travelTo(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...