Toggle navigation
Bulletin
Problems
Submissions
Contests
Discuss
About
Rank
Sign in
Sign up
×
Close
NTUCPC Speed Run! #1
比賽已結束,感謝大家的參與!
題目連結
IOICamp 2025 PreExam 進行中!
IOICamp 官網
、
PreExam 連結
程式解題社網站
程式解題社網站
上線了!
471 . 電梯
Submit
Status
Discussion / Solution
Ranklist
Back to Problems List
TopCoder
我弱弱.3.
User's AC Ratio
68.4% (
13/19
)
Submission's AC Ratio
38.5% (
20
/
52
)
Tags
Show solution-related tags
ytp
ytp-junior
ytp-2024
Description
題目 PDF 檔在這裡
Input Format
Output Format
Sample Input 1
copy
50 3
20 50 5
35 50 2
1 30 3
Sample Output 1
copy
142
Sample Input 2
copy
50 3
20 40 5
45 50 2
1 30 3
Sample Output 2
copy
-1
Sample Input 3
copy
50 7
45 50 5
32 48 7
23 40 6
1 28 10
10 35 8
37 50 12
1 13 5
Sample Output 3
copy
302
Hints
Problem Source
YTP 2024 國中組程式挑戰營 p4
Subtasks
No.
Testdata Range
Constraints
Score
1
0~2
範例測資
0
2
0~12
$1 \leq H \leq 10^ 5, 1 \leq N \leq 10^ 3$
3
3
0~22
$1 \leq H \leq 3 \times 10^ 5, 1 \leq N \leq 3 \times 10^ 5$
3
4
0~32
無額外限制
9
Testdata and Limits
No.
Time Limit (ms)
Memory Limit (VSS, KiB)
Output Limit (KiB)
Subtasks
0
2000
262144
65536
1
2
3
4
1
2000
262144
65536
1
2
3
4
2
2000
262144
65536
1
2
3
4
3
2000
262144
65536
2
3
4
4
2000
262144
65536
2
3
4
5
2000
262144
65536
2
3
4
6
2000
262144
65536
2
3
4
7
2000
262144
65536
2
3
4
8
2000
262144
65536
2
3
4
9
2000
262144
65536
2
3
4
10
2000
262144
65536
2
3
4
11
2000
262144
65536
2
3
4
12
2000
262144
65536
2
3
4
13
2000
262144
65536
3
4
14
2000
262144
65536
3
4
15
2000
262144
65536
3
4
16
2000
262144
65536
3
4
17
2000
262144
65536
3
4
18
2000
262144
65536
3
4
19
2000
262144
65536
3
4
20
2000
262144
65536
3
4
21
2000
262144
65536
3
4
22
2000
262144
65536
3
4
23
2000
262144
65536
4
24
2000
262144
65536
4
25
2000
262144
65536
4
26
2000
262144
65536
4
27
2000
262144
65536
4
28
2000
262144
65536
4
29
2000
262144
65536
4
30
2000
262144
65536
4
31
2000
262144
65536
4
32
2000
262144
65536
4
Submit
Back to Top