Toggle navigation
Bulletin
Problems
Submissions
Contests
Discuss
About
Rank
Sign in
Sign up
×
Close
2024 全國模擬賽題目上線啦 !!!!!
題目在
這裡
~
2236 . Cross
Submit
Status
Discussion / Solution
Ranklist
Back to Problems List
TopCoder
腦子裝咖哩
想像不出自己 AC 的題目是實作不出來的!雖然想像得出來也不一定可以就是了
User's AC Ratio
92.3% (
24/26
)
Submission's AC Ratio
20.1% (
28
/
139
)
Tags
Show solution-related tags
pre-nhspc-2021
全國模擬賽
Description
題目 PDF 檔在這裡
Input Format
Output Format
Sample Input 1
copy
3 3
1 2 1
2 2 2
1 2 1
Sample Output 1
copy
1
Sample Input 2
copy
4 3
1 2 1
2 2 2
1 2 3
1 1 1
Sample Output 2
copy
2
Hints
Problem Source
110 學年度全國資訊學科能力競賽模擬賽
Subtasks
No.
Testdata Range
Constraints
Score
1
0~1
範例測資
0
2
2~12
$M=3$
13
3
0~1, 13~23
$N, M \leq 50$
14
4
24~33
所有$A_{ij}$皆相異
21
5
0~1, 13~23, 34~46
$N \leq 50$
21
6
0~92
無額外限制
31
Testdata and Limits
No.
Time Limit (ms)
Memory Limit (VSS, KiB)
Output Limit (KiB)
Subtasks
0
1000
524288
65536
1
3
5
6
1
1000
524288
65536
1
3
5
6
2
1000
524288
65536
2
6
3
1000
524288
65536
2
6
4
1000
524288
65536
2
6
5
1000
524288
65536
2
6
6
1000
524288
65536
2
6
7
1000
524288
65536
2
6
8
1000
524288
65536
2
6
9
1000
524288
65536
2
6
10
1000
524288
65536
2
6
11
1000
524288
65536
2
6
12
1000
524288
65536
2
6
13
1000
524288
65536
3
5
6
14
1000
524288
65536
3
5
6
15
1000
524288
65536
3
5
6
16
1000
524288
65536
3
5
6
17
1000
524288
65536
3
5
6
18
1000
524288
65536
3
5
6
19
1000
524288
65536
3
5
6
20
1000
524288
65536
3
5
6
21
1000
524288
65536
3
5
6
22
1000
524288
65536
3
5
6
23
1000
524288
65536
3
5
6
24
1000
524288
65536
4
6
25
1000
524288
65536
4
6
26
1000
524288
65536
4
6
27
1000
524288
65536
4
6
28
1000
524288
65536
4
6
29
1000
524288
65536
4
6
30
1000
524288
65536
4
6
31
1000
524288
65536
4
6
32
1000
524288
65536
4
6
33
1000
524288
65536
4
6
34
1000
524288
65536
5
6
35
1000
524288
65536
5
6
36
1000
524288
65536
5
6
37
1000
524288
65536
5
6
38
1000
524288
65536
5
6
39
1000
524288
65536
5
6
40
1000
524288
65536
5
6
41
1000
524288
65536
5
6
42
1000
524288
65536
5
6
43
1000
524288
65536
5
6
44
1000
524288
65536
5
6
45
1000
524288
65536
5
6
46
1000
524288
65536
5
6
47
1000
524288
65536
6
48
1000
524288
65536
6
49
1000
524288
65536
6
50
1000
524288
65536
6
51
1000
524288
65536
6
52
1000
524288
65536
6
53
1000
524288
65536
6
54
1000
524288
65536
6
55
1000
524288
65536
6
56
1000
524288
65536
6
57
1000
524288
65536
6
58
1000
524288
65536
6
59
1000
524288
65536
6
60
1000
524288
65536
6
61
1000
524288
65536
6
62
1000
524288
65536
6
63
1000
524288
65536
6
64
1000
524288
65536
6
65
1000
524288
65536
6
66
1000
524288
65536
6
67
1000
524288
65536
6
68
1000
524288
65536
6
69
1000
524288
65536
6
70
1000
524288
65536
6
71
1000
524288
65536
6
72
1000
524288
65536
6
73
1000
524288
65536
6
74
1000
524288
65536
6
75
1000
524288
65536
6
76
1000
524288
65536
6
77
1000
524288
65536
6
78
1000
524288
65536
6
79
1000
524288
65536
6
80
1000
524288
65536
6
81
1000
524288
65536
6
82
1000
524288
65536
6
83
1000
524288
65536
6
84
1000
524288
65536
6
85
1000
524288
65536
6
86
1000
524288
65536
6
87
1000
524288
65536
6
88
1000
524288
65536
6
89
1000
524288
65536
6
90
1000
524288
65536
6
91
1000
524288
65536
6
92
1000
524288
65536
6
Submit
Back to Top