#D8721. Sightseeing Tour
Sightseeing Tour
Sightseeing Tour
Example
Input
3 0 2 7 2 0 4 5 8 0
Output
11
inputFormat
Input
3 0 2 7 2 0 4 5 8 0
outputFormat
Output
11
样例
3
0 2 7
2 0 4
5 8 0
11
Example
Input
3 0 2 7 2 0 4 5 8 0
Output
11
Input
3 0 2 7 2 0 4 5 8 0
Output
11
3
0 2 7
2 0 4
5 8 0
11
By signing up a OpenJudge universal account, you can submit code and join discussions in all online judging services provided by us.