Toggle navigation
Bulletin
Problems
Submissions
Contests
Discuss
About
Rank
Sign in
Sign up
×
Close
NTUCPC Speed Run! #1
比賽已結束,感謝大家的參與!
題目連結
IOICamp 2025 PreExam 進行中!
IOICamp 官網
、
PreExam 連結
程式解題社網站
程式解題社網站
上線了!
479 . 樓梯
Submit
Status
Discussion / Solution
Ranklist
Back to Problems List
TopCoder
拉菲好可愛 >////<
迷子でもいい、迷子でも進め!
User's AC Ratio
80.0% (
4/5
)
Submission's AC Ratio
50.0% (
7
/
14
)
Tags
Show solution-related tags
ytp
ytp-junior
ytp-2024
Description
題目 PDF 檔在這裡
Input Format
Output Format
Sample Input 1
copy
10 6
2 10
1 3
1 8
2 10
1 3
2 10
Sample Output 1
copy
55
3
13
Sample Input 2
copy
15 8
2 15
1 1
2 15
1 1
1 5
2 15
1 6
2 15
Sample Output 2
copy
610
0
165
0
Sample Input 3
copy
10 10
2 1
2 2
2 3
2 4
2 5
2 6
2 7
2 8
2 9
2 10
Sample Output 3
copy
1
1
2
3
5
8
13
21
34
55
Sample Input 4
copy
20 20
2 5
2 18
2 12
2 2
2 7
1 11
1 11
1 2
2 9
1 2
1 6
1 6
1 9
1 9
2 12
2 9
1 7
1 4
1 10
2 18
Sample Output 4
copy
5
2584
144
1
13
13
144
34
42
Hints
Problem Source
YTP 2024 國中組程式挑戰營 p12
Subtasks
No.
Testdata Range
Constraints
Score
1
0~3
範例測資
0
2
0~11
$N, Q \leq 5000$
3
3
12~14
只有第⼆種詢問,樓梯不會壞掉
8
4
12~17
同⼀時間⾄多只有⼗階是壞掉的還沒修好
7
5
0~24
無額外限制
7
Testdata and Limits
No.
Time Limit (ms)
Memory Limit (VSS, KiB)
Output Limit (KiB)
Subtasks
0
5000
1048576
65536
1
2
5
1
5000
1048576
65536
1
2
5
2
5000
1048576
65536
1
2
5
3
5000
1048576
65536
1
2
5
4
5000
1048576
65536
2
5
5
5000
1048576
65536
2
5
6
5000
1048576
65536
2
5
7
5000
1048576
65536
2
5
8
5000
1048576
65536
2
5
9
5000
1048576
65536
2
5
10
5000
1048576
65536
2
5
11
5000
1048576
65536
2
5
12
5000
1048576
65536
3
4
5
13
5000
1048576
65536
3
4
5
14
5000
1048576
65536
3
4
5
15
5000
1048576
65536
4
5
16
5000
1048576
65536
4
5
17
5000
1048576
65536
4
5
18
5000
1048576
65536
5
19
5000
1048576
65536
5
20
5000
1048576
65536
5
21
5000
1048576
65536
5
22
5000
1048576
65536
5
23
5000
1048576
65536
5
24
5000
1048576
65536
5
Submit
Back to Top