Toggle navigation
Bulletin
Problems
Submissions
Contests
Discuss
About
Rank
Sign in
Sign up
×
Close
2022 全國模擬賽題目上線啦 !!!!!
題目在
這裡
~
2023 全國模擬賽題目上線啦 !!!!!
題目在
這裡
~
2024 全國模擬賽題目上線啦 !!!!!
題目在
這裡
~
2413 . LCA 遊戲
Submit
Status
Discussion / Solution
Ranklist
Back to Problems List
TopCoder
Caido
$\mathbb{W}\mathcal{aimai}\sim$
User's AC Ratio
100.0% (
1/1
)
Submission's AC Ratio
100.0% (
1
/
1
)
Tags
Show solution-related tags
pre-nhspc-2022
全國模擬賽
Description
題目 PDF 檔在這裡
Input Format
Output Format
Sample Input 1
copy
5 1
1 2
2 3
3 4
4 5
Sample Output 1
copy
1
Sample Input 2
copy
5 3
1 2
2 3
3 4
4 5
Sample Output 2
copy
2
Sample Input 3
copy
7 1
1 2
1 3
2 4
2 5
3 6
3 7
Sample Output 3
copy
3
Hints
Problem Source
111 學年度全國資訊學科能力競賽模擬賽
Subtasks
No.
Testdata Range
Constraints
Score
1
0~2
範例測資
0
2
0~22
存在一個節點 $v$,使得以節點 $v$ 為根時,輸入是一棵二元樹
29
3
0~42
無額外限制
71
Testdata and Limits
No.
Time Limit (ms)
Memory Limit (VSS, KiB)
Output Limit (KiB)
Subtasks
0
3000
524288
65536
1
2
3
1
3000
524288
65536
1
2
3
2
3000
524288
65536
1
2
3
3
3000
524288
65536
2
3
4
3000
524288
65536
2
3
5
3000
524288
65536
2
3
6
3000
524288
65536
2
3
7
3000
524288
65536
2
3
8
3000
524288
65536
2
3
9
3000
524288
65536
2
3
10
3000
524288
65536
2
3
11
3000
524288
65536
2
3
12
3000
524288
65536
2
3
13
3000
524288
65536
2
3
14
3000
524288
65536
2
3
15
3000
524288
65536
2
3
16
3000
524288
65536
2
3
17
3000
524288
65536
2
3
18
3000
524288
65536
2
3
19
3000
524288
65536
2
3
20
3000
524288
65536
2
3
21
3000
524288
65536
2
3
22
3000
524288
65536
2
3
23
3000
524288
65536
3
24
3000
524288
65536
3
25
3000
524288
65536
3
26
3000
524288
65536
3
27
3000
524288
65536
3
28
3000
524288
65536
3
29
3000
524288
65536
3
30
3000
524288
65536
3
31
3000
524288
65536
3
32
3000
524288
65536
3
33
3000
524288
65536
3
34
3000
524288
65536
3
35
3000
524288
65536
3
36
3000
524288
65536
3
37
3000
524288
65536
3
38
3000
524288
65536
3
39
3000
524288
65536
3
40
3000
524288
65536
3
41
3000
524288
65536
3
42
3000
524288
65536
3
Submit
Back to Top