#D4156. Marching Course
Marching Course
Marching Course
Example
Input
3 3 4 1 2 1 1 2 3 2 4 3 1 1 1
Output
6
inputFormat
Input
3 3 4 1 2 1 1 2 3 2 4 3 1 1 1
outputFormat
Output
6
样例
3 3 4
1 2 1 1
2 3 2 4
3 1 1 1
6
Example
Input
3 3 4 1 2 1 1 2 3 2 4 3 1 1 1
Output
6
Input
3 3 4 1 2 1 1 2 3 2 4 3 1 1 1
Output
6
3 3 4
1 2 1 1
2 3 2 4
3 1 1 1
6
By signing up a OpenJudge universal account, you can submit code and join discussions in all online judging services provided by us.