Toggle navigation
Bulletin
Problems
Submissions
Contests
Discuss
About
Rank
Sign in
Sign up
×
Close
1306
已加強測資並 rejudge
2372 . F. 恐怖的黑色魔物 (Monster)
Submit
Status
Discussion / Solution
Ranklist
Back to Problems List
TopCoder
Gu2
User's AC Ratio
90.0% (
18/20
)
Submission's AC Ratio
21.8% (
24
/
110
)
Tags
Show solution-related tags
全國賽
2023-全國賽
nhspc112
Description
題目 PDF 檔在這裡
Input Format
Output Format
Sample Input 1
copy
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
copy
2
1
2
0
Sample Input 2
copy
1 1 3
1
1 1 2
1
1 1 1 1 1 3
Sample Output 2
copy
0
Hints
Problem Source
112 學年度全國資訊學科能力競賽
測資來源:
TWPCA GitHub
Subtasks
No.
Testdata Range
Constraints
Score
1
0~1
範例測資
0
2
1~13
F
=
R
=
1
,
M
N
≤
100
,
Q
≤
100
6
3
14~23
對任意
i
∈
1
,
2
,
…
,
Q
,均有
(
a
i
,
b
i
,
c
i
)
=
(
x
i
,
y
i
,
z
i
)
21
4
1~13, 24~34
F
M
N
≤
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
Submit
Back to Top