Submission #906045


Source Code Expand

Copy
N = int(input())
c = 0
a = list(map(int,input().split()))
for l in range(N):
	for r in range(l,N):
		c += min(a[l:r+1])
print(c)

Submission Info

Submission Time
Task B - Minimum Sum
User TAB
Language Python3 (3.4.3)
Score 0
Code Size 134 Byte
Status

Test Cases

Set Name Score / Max Score Test Cases
Sample 0 / 0 example0, example1, example2
All 0 / 400 corner0, corner1, corner2, corner3, example0, example1, example2, maxrand0, maxrand1, maxrand2, rand0, rand1, rand2
Case Name Status Exec Time Memory
corner0
corner1
corner2 23 ms 3064 KB
corner3
example0 22 ms 3064 KB
example1 22 ms 3064 KB
example2 22 ms 3064 KB
maxrand0
maxrand1
maxrand2
rand0 113 ms 3064 KB
rand1 22 ms 3064 KB
rand2 26 ms 3064 KB