#include "citymapping.h"
#include <vector>
using namespace std;
void find_roads(int N, int Q, int A[], int B[], int W[]) {
vector<pair<int, pair<int, int>>> e;
int xx = 0;
for (int i = 1; i <= N; i++) {
for (int j = i + 1; j <= N; j++) {
int temp = get_distance(i, j);
if (temp == 1) {
A[xx] = i;
B[xx] = j;
W[xx] = 1;
xx++;
}
}
}
return;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
50 ms |
432 KB |
Correct: 498501 out of 500000 queries used. |
2 |
Correct |
34 ms |
456 KB |
Correct: 499500 out of 500000 queries used. |
3 |
Correct |
37 ms |
432 KB |
Correct: 492528 out of 500000 queries used. |
4 |
Correct |
26 ms |
416 KB |
Correct: 494515 out of 500000 queries used. |
5 |
Correct |
39 ms |
404 KB |
Correct: 498501 out of 500000 queries used. |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
50 ms |
432 KB |
Correct: 498501 out of 500000 queries used. |
2 |
Correct |
34 ms |
456 KB |
Correct: 499500 out of 500000 queries used. |
3 |
Correct |
37 ms |
432 KB |
Correct: 492528 out of 500000 queries used. |
4 |
Correct |
26 ms |
416 KB |
Correct: 494515 out of 500000 queries used. |
5 |
Correct |
39 ms |
404 KB |
Correct: 498501 out of 500000 queries used. |
6 |
Incorrect |
32 ms |
468 KB |
Reported list of edges differ from actual. |
7 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
468 KB |
Too many calls to get_distance(). |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
468 KB |
Too many calls to get_distance(). |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
50 ms |
432 KB |
Correct: 498501 out of 500000 queries used. |
2 |
Correct |
34 ms |
456 KB |
Correct: 499500 out of 500000 queries used. |
3 |
Correct |
37 ms |
432 KB |
Correct: 492528 out of 500000 queries used. |
4 |
Correct |
26 ms |
416 KB |
Correct: 494515 out of 500000 queries used. |
5 |
Correct |
39 ms |
404 KB |
Correct: 498501 out of 500000 queries used. |
6 |
Incorrect |
32 ms |
468 KB |
Reported list of edges differ from actual. |
7 |
Halted |
0 ms |
0 KB |
- |