TopCoder

Caido
$\mathbb{W}\mathcal{aimai}\sim$

User's AC Ratio

100.0% (3/3)

Submission's AC Ratio

100.0% (3/3)

Tags

Description

Input Format

Output Format

Sample Input 1

2
4 5
6 7

Sample Output 1

0

Sample Input 2

6
0 0
0 4
5 0
5 5
2 1
2 4

Sample Output 2

25

Sample Input 3

10
1 13
11 11
7 6
11 12
13 1
1 6
6 13
3 12
12 0
10 4

Sample Output 3

137

Hints

Problem Source

112 學年度全國資訊學科能力競賽模擬賽

Subtasks

No. Testdata Range Constraints Score
1 0~2 範例測資 0
2 0~43 $N \leq 3000$ 24
3 0~75 無額外限制 76

Testdata and Limits

No. Time Limit (ms) Memory Limit (VSS, KiB) Output Limit (KiB) Subtasks
0 1500 524288 65536 1 2 3
1 1500 524288 65536 1 2 3
2 1500 524288 65536 1 2 3
3 1500 524288 65536 2 3
4 1500 524288 65536 2 3
5 1500 524288 65536 2 3
6 1500 524288 65536 2 3
7 1500 524288 65536 2 3
8 1500 524288 65536 2 3
9 1500 524288 65536 2 3
10 1500 524288 65536 2 3
11 1500 524288 65536 2 3
12 1500 524288 65536 2 3
13 1500 524288 65536 2 3
14 1500 524288 65536 2 3
15 1500 524288 65536 2 3
16 1500 524288 65536 2 3
17 1500 524288 65536 2 3
18 1500 524288 65536 2 3
19 1500 524288 65536 2 3
20 1500 524288 65536 2 3
21 1500 524288 65536 2 3
22 1500 524288 65536 2 3
23 1500 524288 65536 2 3
24 1500 524288 65536 2 3
25 1500 524288 65536 2 3
26 1500 524288 65536 2 3
27 1500 524288 65536 2 3
28 1500 524288 65536 2 3
29 1500 524288 65536 2 3
30 1500 524288 65536 2 3
31 1500 524288 65536 2 3
32 1500 524288 65536 2 3
33 1500 524288 65536 2 3
34 1500 524288 65536 2 3
35 1500 524288 65536 2 3
36 1500 524288 65536 2 3
37 1500 524288 65536 2 3
38 1500 524288 65536 2 3
39 1500 524288 65536 2 3
40 1500 524288 65536 2 3
41 1500 524288 65536 2 3
42 1500 524288 65536 2 3
43 1500 524288 65536 2 3
44 1500 524288 65536 3
45 1500 524288 65536 3
46 1500 524288 65536 3
47 1500 524288 65536 3
48 1500 524288 65536 3
49 1500 524288 65536 3
50 1500 524288 65536 3
51 1500 524288 65536 3
52 1500 524288 65536 3
53 1500 524288 65536 3
54 1500 524288 65536 3
55 1500 524288 65536 3
56 1500 524288 65536 3
57 1500 524288 65536 3
58 1500 524288 65536 3
59 1500 524288 65536 3
60 1500 524288 65536 3
61 1500 524288 65536 3
62 1500 524288 65536 3
63 1500 524288 65536 3
64 1500 524288 65536 3
65 1500 524288 65536 3
66 1500 524288 65536 3
67 1500 524288 65536 3
68 1500 524288 65536 3
69 1500 524288 65536 3
70 1500 524288 65536 3
71 1500 524288 65536 3
72 1500 524288 65536 3
73 1500 524288 65536 3
74 1500 524288 65536 3
75 1500 524288 65536 3