feat(content): hidden test cases

This commit is contained in:
2025-08-06 23:21:42 +01:00
parent 89b5dd1457
commit 6bed0a6787
134 changed files with 2075 additions and 0 deletions

View File

@@ -11,6 +11,24 @@ patterns:
- union-find
- two-pointers
function_signature: "def distance_limited_paths_exist(n: int, edge_list: list[list[int]], queries: list[list[int]]) -> list[bool]:"
test_cases:
visible:
- input: { n: 3, edge_list: [[0, 1, 2], [1, 2, 4], [2, 0, 8], [1, 0, 16]], queries: [[0, 1, 2], [0, 2, 5]] }
expected: [false, true]
- input: { n: 5, edge_list: [[0, 1, 10], [1, 2, 5], [2, 3, 9], [3, 4, 13]], queries: [[0, 4, 14], [1, 4, 13]] }
expected: [true, false]
hidden:
- input: { n: 2, edge_list: [[0, 1, 1]], queries: [[0, 1, 2]] }
expected: [true]
- input: { n: 2, edge_list: [[0, 1, 5]], queries: [[0, 1, 5]] }
expected: [false]
- input: { n: 3, edge_list: [[0, 1, 1], [1, 2, 1]], queries: [[0, 2, 2]] }
expected: [true]
- input: { n: 3, edge_list: [], queries: [[0, 1, 1]] }
expected: [false]
description: |
An undirected graph of `n` nodes is defined by `edgeList`, where `edgeList[i] = [u_i, v_i, dis_i]` denotes an edge between nodes `u_i` and `v_i` with distance `dis_i`. Note that there may be **multiple** edges between two nodes.