Toggle navigation
Bulletin
Problems
Submissions
Contests
Discuss
About
Rank
Sign in
Sign up
×
Close
NTUCPC Speed Run! #1
比賽已結束,感謝大家的參與!
題目連結
IOICamp 2025 PreExam 進行中!
IOICamp 官網
、
PreExam 連結
程式解題社網站
程式解題社網站
上線了!
478 . 水果優勢
Submit
Status
Discussion / Solution
Ranklist
Back to Problems List
TopCoder
拉菲好可愛 >////<
迷子でもいい、迷子でも進め!
User's AC Ratio
100.0% (
5/5
)
Submission's AC Ratio
61.5% (
8
/
13
)
Tags
Show solution-related tags
ytp
ytp-junior
ytp-2024
Description
題目 PDF 檔在這裡
Input Format
Output Format
Sample Input 1
copy
5 5 3
1 1 1 0 0
1 0 0 0 0
0 2 2 0 3
0 0 2 2 3
0 0 0 0 3
Sample Output 1
copy
2
Sample Input 2
copy
3 4 4
0 1 0 4
2 1 3 4
2 0 3 0
Sample Output 2
copy
1
Sample Input 3
copy
3 3 5
1 2 3
4 0 0
5 0 0
Sample Output 3
copy
2
Sample Input 4
copy
4 5 7
0 6 7 3 5
0 0 0 3 5
4 0 0 3 0
1 0 0 2 0
Sample Output 4
copy
3
Hints
Problem Source
YTP 2024 國中組程式挑戰營 p11
Subtasks
No.
Testdata Range
Constraints
Score
1
0~3
範例測資
0
2
0~28
$1 \leq N, M \leq 7$
6
3
0~68
無額外限制
19
Testdata and Limits
No.
Time Limit (ms)
Memory Limit (VSS, KiB)
Output Limit (KiB)
Subtasks
0
2000
262144
65536
1
2
3
1
2000
262144
65536
1
2
3
2
2000
262144
65536
1
2
3
3
2000
262144
65536
1
2
3
4
2000
262144
65536
2
3
5
2000
262144
65536
2
3
6
2000
262144
65536
2
3
7
2000
262144
65536
2
3
8
2000
262144
65536
2
3
9
2000
262144
65536
2
3
10
2000
262144
65536
2
3
11
2000
262144
65536
2
3
12
2000
262144
65536
2
3
13
2000
262144
65536
2
3
14
2000
262144
65536
2
3
15
2000
262144
65536
2
3
16
2000
262144
65536
2
3
17
2000
262144
65536
2
3
18
2000
262144
65536
2
3
19
2000
262144
65536
2
3
20
2000
262144
65536
2
3
21
2000
262144
65536
2
3
22
2000
262144
65536
2
3
23
2000
262144
65536
2
3
24
2000
262144
65536
2
3
25
2000
262144
65536
2
3
26
2000
262144
65536
2
3
27
2000
262144
65536
2
3
28
2000
262144
65536
2
3
29
2000
262144
65536
3
30
2000
262144
65536
3
31
2000
262144
65536
3
32
2000
262144
65536
3
33
2000
262144
65536
3
34
2000
262144
65536
3
35
2000
262144
65536
3
36
2000
262144
65536
3
37
2000
262144
65536
3
38
2000
262144
65536
3
39
2000
262144
65536
3
40
2000
262144
65536
3
41
2000
262144
65536
3
42
2000
262144
65536
3
43
2000
262144
65536
3
44
2000
262144
65536
3
45
2000
262144
65536
3
46
2000
262144
65536
3
47
2000
262144
65536
3
48
2000
262144
65536
3
49
2000
262144
65536
3
50
2000
262144
65536
3
51
2000
262144
65536
3
52
2000
262144
65536
3
53
2000
262144
65536
3
54
2000
262144
65536
3
55
2000
262144
65536
3
56
2000
262144
65536
3
57
2000
262144
65536
3
58
2000
262144
65536
3
59
2000
262144
65536
3
60
2000
262144
65536
3
61
2000
262144
65536
3
62
2000
262144
65536
3
63
2000
262144
65536
3
64
2000
262144
65536
3
65
2000
262144
65536
3
66
2000
262144
65536
3
67
2000
262144
65536
3
68
2000
262144
65536
3
Submit
Back to Top