408192: GYM103049 B Bulldozer

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

Description

B. Bulldozertime limit per test5 secondsmemory limit per test1024 megabytesinputstandard inputoutputstandard outputExamplesInput
5
1 1 2 1 1
Output
2
Input
5
1 4 3 1 1
Output
7
Input
9
1 0 0 0 6 0 0 0 1
Output
5
Input
10
1 3 0 0 1 9 1 1 1 1
Output
13

加入题单

上一题 下一题 算法标签: