Submission #7386385


Source Code Expand

Copy
INF = 10**6

N = int(input())
Bs = [INF] + list(map(int, input().split())) + [INF]

ans = 0
for i in range(N):
    ans += min(Bs[i], Bs[i+1])

print(ans)

Submission Info

Submission Time
Task C - Maximal Value
User ZollingerPython3
Language Python (3.4.3)
Score 300
Code Size 164 Byte
Status AC
Exec Time 18 ms
Memory 2940 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 3
AC × 15
Set Name Test Cases
Sample sample00, sample01, sample02
All handmade03, handmade04, handmade05, handmade06, handmade07, handmade08, handmade09, random10, random11, random12, random13, random14, sample00, sample01, sample02
Case Name Status Exec Time Memory
handmade03 AC 17 ms 2940 KB
handmade04 AC 17 ms 2940 KB
handmade05 AC 17 ms 2940 KB
handmade06 AC 17 ms 2940 KB
handmade07 AC 17 ms 2940 KB
handmade08 AC 18 ms 2940 KB
handmade09 AC 17 ms 2940 KB
random10 AC 17 ms 2940 KB
random11 AC 17 ms 2940 KB
random12 AC 17 ms 2940 KB
random13 AC 17 ms 2940 KB
random14 AC 17 ms 2940 KB
sample00 AC 17 ms 2940 KB
sample01 AC 17 ms 2940 KB
sample02 AC 17 ms 2940 KB