Toggle navigation
Bulletin
Problems
Submissions
Contests
Discuss
About
Rank
Sign in
Sign up
×
Close
NTUCPC Speed Run! #1
比賽已結束,感謝大家的參與!
題目連結
IOICamp 2025 PreExam 進行中!
IOICamp 官網
、
PreExam 連結
程式解題社網站
程式解題社網站
上線了!
458 . 優奈與祕銀
Submit
Status
Discussion / Solution
Ranklist
Back to Problems List
TopCoder
Fysty
User's AC Ratio
100.0% (
2/2
)
Submission's AC Ratio
100.0% (
2
/
2
)
Tags
Show solution-related tags
ytp
ytp-senior
ytp-2024
Description
題目 PDF 檔在這裡
Input Format
Output Format
Sample Input 1
copy
6 6 2
1 5
Sample Output 1
copy
499122180 831870297 499122179 332748120 748683267 457528664
Sample Input 2
copy
864197532 1 1
565656562
Sample Output 2
copy
931220943
Sample Input 3
copy
20 10 5
0 3 7 14 19
Sample Output 3
copy
499122187 411276681 367353928 350583422 846511216 333512644 47264079 475033985 232520342 449759810
Hints
Problem Source
YTP 2024 高中組程式挑戰營 p17
Subtasks
No.
Testdata Range
Constraints
Score
1
0~2
範例測資
0
2
0~32
$m, k \leq 2000$
8
3
0~52
無額外限制
17
Testdata and Limits
No.
Time Limit (ms)
Memory Limit (VSS, KiB)
Output Limit (KiB)
Subtasks
0
4000
524288
65536
1
2
3
1
4000
524288
65536
1
2
3
2
4000
524288
65536
1
2
3
3
4000
524288
65536
2
3
4
4000
524288
65536
2
3
5
4000
524288
65536
2
3
6
4000
524288
65536
2
3
7
4000
524288
65536
2
3
8
4000
524288
65536
2
3
9
4000
524288
65536
2
3
10
4000
524288
65536
2
3
11
4000
524288
65536
2
3
12
4000
524288
65536
2
3
13
4000
524288
65536
2
3
14
4000
524288
65536
2
3
15
4000
524288
65536
2
3
16
4000
524288
65536
2
3
17
4000
524288
65536
2
3
18
4000
524288
65536
2
3
19
4000
524288
65536
2
3
20
4000
524288
65536
2
3
21
4000
524288
65536
2
3
22
4000
524288
65536
2
3
23
4000
524288
65536
2
3
24
4000
524288
65536
2
3
25
4000
524288
65536
2
3
26
4000
524288
65536
2
3
27
4000
524288
65536
2
3
28
4000
524288
65536
2
3
29
4000
524288
65536
2
3
30
4000
524288
65536
2
3
31
4000
524288
65536
2
3
32
4000
524288
65536
2
3
33
4000
524288
65536
3
34
4000
524288
65536
3
35
4000
524288
65536
3
36
4000
524288
65536
3
37
4000
524288
65536
3
38
4000
524288
65536
3
39
4000
524288
65536
3
40
4000
524288
65536
3
41
4000
524288
65536
3
42
4000
524288
65536
3
43
4000
524288
65536
3
44
4000
524288
65536
3
45
4000
524288
65536
3
46
4000
524288
65536
3
47
4000
524288
65536
3
48
4000
524288
65536
3
49
4000
524288
65536
3
50
4000
524288
65536
3
51
4000
524288
65536
3
52
4000
524288
65536
3
Submit
Back to Top