Toggle navigation
Bulletin
Problems
Submissions
Contests
Discuss
About
Rank
Sign in
Sign up
×
Close
Rejudge 公告
718
,
552
已新增測資並 rejudge
IOICamp 2024 題目公開!
連結
程式解題社網站
程式解題社網站
上線了!
460 . 有趣的樹上結構
Submit
Status
Discussion / Solution
Ranklist
Back to Problems List
TopCoder
拉菲好可愛 >////<
迷子でもいい、迷子でも進め!
User's AC Ratio
100.0% (
1/1
)
Submission's AC Ratio
33.3% (
1
/
3
)
Tags
Show solution-related tags
ytp
ytp-senior
ytp-2024
Description
題目 PDF 檔在這裡
Input Format
Output Format
Sample Input 1
copy
2
4
1 2
2 1
3 1
1 3
3
1 2
2 3
3 1
8
1 3
1 7
2 7
4 4
3 7
1 6
1 7
1 1
4
1 3
3 6
6 2
2 7
Sample Output 1
copy
Omoshiree
Omoshiree
Sample Input 2
copy
3
5
1 2
2 4
3 6
4 8
5 10
9
1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
4
1 2
2 7
8 7
7 2
4
1 2
2 7
8 7
7 2
3
1 1
1 2
6 6
1
2 1
Sample Output 2
copy
Tsumannee
Kowaresou
Kowaresou
Hints
Problem Source
YTP 2024 高中組程式挑戰營 p19
Subtasks
No.
Testdata Range
Constraints
Score
1
0~1
範例測資
0
2
29~33
a
i
<
b
i
,
u
j
=
v
j
=
1
2
3
17~20, 29~33
u
j
=
v
j
=
1
10
4
0~6, 20, 27~28, 33
k
,
m
≤
800
3
5
0~11, 19~20, 24~28, 31~33
k
,
m
≤
20000
4
6
0~33
無額外限制
6
Testdata and Limits
No.
Time Limit (ms)
Memory Limit (VSS, KiB)
Output Limit (KiB)
Subtasks
0
5000
1048576
65536
1
4
5
6
1
5000
1048576
65536
1
4
5
6
2
5000
1048576
65536
4
5
6
3
5000
1048576
65536
4
5
6
4
5000
1048576
65536
4
5
6
5
5000
1048576
65536
4
5
6
6
5000
1048576
65536
4
5
6
7
5000
1048576
65536
5
6
8
5000
1048576
65536
5
6
9
5000
1048576
65536
5
6
10
5000
1048576
65536
5
6
11
5000
1048576
65536
5
6
12
5000
1048576
65536
6
13
5000
1048576
65536
6
14
5000
1048576
65536
6
15
5000
1048576
65536
6
16
5000
1048576
65536
6
17
5000
1048576
65536
3
6
18
5000
1048576
65536
3
6
19
5000
1048576
65536
3
5
6
20
5000
1048576
65536
3
4
5
6
21
5000
1048576
65536
6
22
5000
1048576
65536
6
23
5000
1048576
65536
6
24
5000
1048576
65536
5
6
25
5000
1048576
65536
5
6
26
5000
1048576
65536
5
6
27
5000
1048576
65536
4
5
6
28
5000
1048576
65536
4
5
6
29
5000
1048576
65536
2
3
6
30
5000
1048576
65536
2
3
6
31
5000
1048576
65536
2
3
5
6
32
5000
1048576
65536
2
3
5
6
33
5000
1048576
65536
2
3
4
5
6
Submit
Back to Top