409128: GYM103443 F What a Colorful Wall

Memory Limit:1024 MB Time Limit:3 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

F. What a Colorful Walltime limit per test3 secondsmemory limit per test1024 megabytesinputstandard inputoutputstandard outputExamplesInput
3
1 6 3 3 1
3 4 6 1 2
2 5 5 2 1
Output
2
Input
3
2 3 3 2 3
1 4 4 1 1
5 4 6 3 2
Output
2
Input
3
0 1 2 0 1
0 1 1 0 2
2 1 3 0 2
Output
2

加入题单

上一题 下一题 算法标签: