Submission #747903

# Submission time Handle Problem Language Result Execution time Memory
747903 2023-05-25T07:14:04 Z saayan007 City Mapping (NOI18_citymapping) C++17
9 / 100
41 ms 500 KB
#include "bits/stdc++.h"
#include "citymapping.h"
using namespace std;

void find_roads(int N, int Q, int A[], int B[], int W[]) {
    int k = 0;
    for(int i = 1; i <= N; ++i) {
        for(int j = i + 1; j <= N; ++j) {
            if(get_distance(i, j) == 1) {
                A[k] = i; B[k] = j; W[k] = 1;
                ++k;
            }
        }
    }
	/* for (int i = 0; i < N - 1; i++) { */
	/* 	A[i] = 1; */
	/* 	B[i] = 2; */
	/* 	W[i] = 1; */
	/* } */
	return;
}
# Verdict Execution time Memory Grader output
1 Correct 41 ms 468 KB Correct: 498501 out of 500000 queries used.
2 Correct 35 ms 468 KB Correct: 499500 out of 500000 queries used.
3 Correct 31 ms 448 KB Correct: 492528 out of 500000 queries used.
4 Correct 26 ms 448 KB Correct: 494515 out of 500000 queries used.
5 Correct 35 ms 436 KB Correct: 498501 out of 500000 queries used.
# Verdict Execution time Memory Grader output
1 Correct 41 ms 468 KB Correct: 498501 out of 500000 queries used.
2 Correct 35 ms 468 KB Correct: 499500 out of 500000 queries used.
3 Correct 31 ms 448 KB Correct: 492528 out of 500000 queries used.
4 Correct 26 ms 448 KB Correct: 494515 out of 500000 queries used.
5 Correct 35 ms 436 KB Correct: 498501 out of 500000 queries used.
6 Incorrect 33 ms 500 KB Reported list of edges differ from actual.
7 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 464 KB Too many calls to get_distance().
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 464 KB Too many calls to get_distance().
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 41 ms 468 KB Correct: 498501 out of 500000 queries used.
2 Correct 35 ms 468 KB Correct: 499500 out of 500000 queries used.
3 Correct 31 ms 448 KB Correct: 492528 out of 500000 queries used.
4 Correct 26 ms 448 KB Correct: 494515 out of 500000 queries used.
5 Correct 35 ms 436 KB Correct: 498501 out of 500000 queries used.
6 Incorrect 33 ms 500 KB Reported list of edges differ from actual.
7 Halted 0 ms 0 KB -