TopCoder

Caido
主唱太拼命了

User's AC Ratio

80.0% (4/5)

Submission's AC Ratio

66.7% (6/9)

Tags

Description

Input Format

Output Format

Sample Input 1

5 5
0 4
-2 1
-3 -1
2 1
3 -1
1 -3 3
1 3 2
1 0 0
2 0 1
1 0 0

Sample Output 1

3
2
3
1

Sample Input 2

5 7
-3 3
0 0
3 -3
3 3
-3 -3
1 1 2
1 -2 2
1 0 -2
2 0 -3
2 0 3
1 1 2
1 0 -2

Sample Output 2

3
2
2
2
1

Hints

Problem Source

YTP 2023 高中組程式挑戰營 p13

Subtasks

No. Testdata Range Constraints Score
1 0~1 範例測資 0
2 2~7 只有第一種事件 10
3 0~14 無額外限制 15

Testdata and Limits

No. Time Limit (ms) Memory Limit (VSS, KiB) Output Limit (KiB) Subtasks
0 15000 524288 65536 1 3
1 15000 524288 65536 1 3
2 15000 524288 65536 2 3
3 15000 524288 65536 2 3
4 15000 524288 65536 2 3
5 15000 524288 65536 2 3
6 15000 524288 65536 2 3
7 15000 524288 65536 2 3
8 15000 524288 65536 3
9 15000 524288 65536 3
10 15000 524288 65536 3
11 15000 524288 65536 3
12 15000 524288 65536 3
13 15000 524288 65536 3
14 15000 524288 65536 3