Submission #16034

# Submission time Handle Problem Language Result Execution time Memory
16034 2015-08-10T11:14:51 Z hongjun7 Computer Network (BOI14_network) C++
25 / 100
150 ms 5084 KB
#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 time Memory Grader output
1 Correct 150 ms 5084 KB Output is correct
2 Correct 139 ms 5084 KB Output is correct
3 Correct 140 ms 5084 KB Output is correct
4 Correct 115 ms 5084 KB Output is correct
5 Correct 88 ms 5084 KB Output is correct
6 Correct 70 ms 5084 KB Output is correct
7 Correct 0 ms 5084 KB Output is correct
8 Correct 0 ms 5084 KB Output is correct
9 Correct 0 ms 5084 KB Output is correct
10 Correct 0 ms 5084 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 5084 KB Output isn't correct - Travelling to nonadjacent computer
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 107 ms 5084 KB Output isn't correct - Travelling to nonadjacent computer
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 109 ms 5084 KB Output isn't correct - Travelling to nonadjacent computer
2 Halted 0 ms 0 KB -