TopCoder

User's AC Ratio

100.0% (2/2)

Submission's AC Ratio

50.0% (2/4)

Tags

Description

Input Format

Output Format

Sample Input 1

3 1
1 1

Sample Output 1

4

Sample Input 2

4 0

Sample Output 2

0

Sample Input 3

8 8
0 0
0 1
3 6
7 7
6 2
4 2
6 4
5 1

Sample Output 3

104

Hints

Problem Source

YTP 2020 高中組初賽 p7

Subtasks

No. Testdata Range Constraints Score
1 0~2 範例測資 0
2 0~24 無額外限制 25

Testdata and Limits

No. Time Limit (ms) Memory Limit (VSS, KiB) Output Limit (KiB) Subtasks
0 5000 262144 65536 1 2
1 5000 262144 65536 1 2
2 5000 262144 65536 1 2
3 5000 262144 65536 2
4 5000 262144 65536 2
5 5000 262144 65536 2
6 5000 262144 65536 2
7 5000 262144 65536 2
8 5000 262144 65536 2
9 5000 262144 65536 2
10 5000 262144 65536 2
11 5000 262144 65536 2
12 5000 262144 65536 2
13 5000 262144 65536 2
14 5000 262144 65536 2
15 5000 262144 65536 2
16 5000 262144 65536 2
17 5000 262144 65536 2
18 5000 262144 65536 2
19 5000 262144 65536 2
20 5000 262144 65536 2
21 5000 262144 65536 2
22 5000 262144 65536 2
23 5000 262144 65536 2
24 5000 262144 65536 2