Toggle navigation
Bulletin
Problems
Submissions
Contests
Discuss
About
Rank
Sign in
Sign up
×
Close
NTUCPC Speed Run! #1
比賽已結束,感謝大家的參與!
題目連結
IOICamp 2025 PreExam 進行中!
IOICamp 官網
、
PreExam 連結
程式解題社網站
程式解題社網站
上線了!
454 . 神聖聯盟
Submit
Status
Discussion / Solution
Ranklist
Back to Problems List
TopCoder
Caido
主唱太拼命了
User's AC Ratio
100.0% (
10/10
)
Submission's AC Ratio
77.8% (
56
/
72
)
Tags
Show solution-related tags
ytp
ytp-senior
ytp-2024
Description
題目 PDF 檔在這裡
Input Format
Output Format
Sample Input 1
copy
3 2 1
3
1 2
2 3
Sample Output 1
copy
500000004
Sample Input 2
copy
4 6 2
3 4
1 2
1 3
1 4
2 3
2 4
3 4
Sample Output 2
copy
333333336
Sample Input 3
copy
6 6 3
1 2 3
1 4
2 4
3 4
4 5
4 6
5 6
Sample Output 3
copy
500000004
Hints
Problem Source
YTP 2024 高中組程式挑戰營 p13
Subtasks
No.
Testdata Range
Constraints
Score
1
0~2
範例測資
0
2
0~13
$N \leq 15$
3
3
0~30
$N \leq 26$
3
4
0~61
無額外限制
14
Testdata and Limits
No.
Time Limit (ms)
Memory Limit (VSS, KiB)
Output Limit (KiB)
Subtasks
0
5000
1048576
65536
1
2
3
4
1
5000
1048576
65536
1
2
3
4
2
5000
1048576
65536
1
2
3
4
3
5000
1048576
65536
2
3
4
4
5000
1048576
65536
2
3
4
5
5000
1048576
65536
2
3
4
6
5000
1048576
65536
2
3
4
7
5000
1048576
65536
2
3
4
8
5000
1048576
65536
2
3
4
9
5000
1048576
65536
2
3
4
10
5000
1048576
65536
2
3
4
11
5000
1048576
65536
2
3
4
12
5000
1048576
65536
2
3
4
13
5000
1048576
65536
2
3
4
14
5000
1048576
65536
3
4
15
5000
1048576
65536
3
4
16
5000
1048576
65536
3
4
17
5000
1048576
65536
3
4
18
5000
1048576
65536
3
4
19
5000
1048576
65536
3
4
20
5000
1048576
65536
3
4
21
5000
1048576
65536
3
4
22
5000
1048576
65536
3
4
23
5000
1048576
65536
3
4
24
5000
1048576
65536
3
4
25
5000
1048576
65536
3
4
26
5000
1048576
65536
3
4
27
5000
1048576
65536
3
4
28
5000
1048576
65536
3
4
29
5000
1048576
65536
3
4
30
5000
1048576
65536
3
4
31
5000
1048576
65536
4
32
5000
1048576
65536
4
33
5000
1048576
65536
4
34
5000
1048576
65536
4
35
5000
1048576
65536
4
36
5000
1048576
65536
4
37
5000
1048576
65536
4
38
5000
1048576
65536
4
39
5000
1048576
65536
4
40
5000
1048576
65536
4
41
5000
1048576
65536
4
42
5000
1048576
65536
4
43
5000
1048576
65536
4
44
5000
1048576
65536
4
45
5000
1048576
65536
4
46
5000
1048576
65536
4
47
5000
1048576
65536
4
48
5000
1048576
65536
4
49
5000
1048576
65536
4
50
5000
1048576
65536
4
51
5000
1048576
65536
4
52
5000
1048576
65536
4
53
5000
1048576
65536
4
54
5000
1048576
65536
4
55
5000
1048576
65536
4
56
5000
1048576
65536
4
57
5000
1048576
65536
4
58
5000
1048576
65536
4
59
5000
1048576
65536
4
60
5000
1048576
65536
4
61
5000
1048576
65536
4
Submit
Back to Top