TopCoder

Gu2

User's AC Ratio

81.8% (9/11)

Submission's AC Ratio

32.6% (14/43)

Tags

Description

Input Format

Output Format

Sample Input 1

3 3 3
3
1 1 1
2 2 2
3 3 3
4
1 3 3 3 1 1
1 2 2 3 2 2
1 2 3 1 2 3
1 1 1 3 3 3

Sample Output 1

2
1
2
0

Sample Input 2

1 1 3
1
1 1 2
1
1 1 1 1 1 3

Sample Output 2

0

Hints

Problem Source

112 學年度全國資訊學科能力競賽
測資來源:TWPCA GitHub

Subtasks

No. Testdata Range Constraints Score
1 0~1 範例測資 0
2 1~13 $F = R = 1, MN \le 100, Q \le 100$ 6
3 14~23 對任意 $i \in {1, 2, \ldots, Q}$,均有 $(a_i, b_i, c_i) = (x_i, y_i, z_i)$ 21
4 1~13, 24~34 $FMN \le 3000$ 4
5 1, 35~47 $Q = 1$ 25
6 0~57 無額外限制 44

Testdata and Limits

No. Time Limit (ms) Memory Limit (VSS, KiB) Output Limit (KiB) Subtasks
0 1000 1048576 65536 1 6
1 1000 1048576 65536 1 2 4 5 6
2 1000 1048576 65536 2 4 6
3 1000 1048576 65536 2 4 6
4 1000 1048576 65536 2 4 6
5 1000 1048576 65536 2 4 6
6 1000 1048576 65536 2 4 6
7 1000 1048576 65536 2 4 6
8 1000 1048576 65536 2 4 6
9 1000 1048576 65536 2 4 6
10 1000 1048576 65536 2 4 6
11 1000 1048576 65536 2 4 6
12 1000 1048576 65536 2 4 6
13 1000 1048576 65536 2 4 6
14 1000 1048576 65536 3 6
15 1000 1048576 65536 3 6
16 1000 1048576 65536 3 6
17 1000 1048576 65536 3 6
18 1000 1048576 65536 3 6
19 1000 1048576 65536 3 6
20 1000 1048576 65536 3 6
21 1000 1048576 65536 3 6
22 1000 1048576 65536 3 6
23 1000 1048576 65536 3 6
24 1000 1048576 65536 4 6
25 1000 1048576 65536 4 6
26 1000 1048576 65536 4 6
27 1000 1048576 65536 4 6
28 1000 1048576 65536 4 6
29 1000 1048576 65536 4 6
30 1000 1048576 65536 4 6
31 1000 1048576 65536 4 6
32 1000 1048576 65536 4 6
33 1000 1048576 65536 4 6
34 1000 1048576 65536 4 6
35 1000 1048576 65536 5 6
36 1000 1048576 65536 5 6
37 1000 1048576 65536 5 6
38 1000 1048576 65536 5 6
39 1000 1048576 65536 5 6
40 1000 1048576 65536 5 6
41 1000 1048576 65536 5 6
42 1000 1048576 65536 5 6
43 1000 1048576 65536 5 6
44 1000 1048576 65536 5 6
45 1000 1048576 65536 5 6
46 1000 1048576 65536 5 6
47 1000 1048576 65536 5 6
48 1000 1048576 65536 6
49 1000 1048576 65536 6
50 1000 1048576 65536 6
51 1000 1048576 65536 6
52 1000 1048576 65536 6
53 1000 1048576 65536 6
54 1000 1048576 65536 6
55 1000 1048576 65536 6
56 1000 1048576 65536 6
57 1000 1048576 65536 6