95972024-02-23 14:08:20DohajovDanielVásárlás (75 pont)python3Wrong answer 0/75453ms44040 KiB
tdb = int(input())
b1L = [int(i) for i in input().split()]
b2L = [int(i) for i in input().split()]
b1sz = 0; asz=0; bsz=0; j=0
for i in range(tdb):
    asz+=b1L[i]
    if sum(b2L[j:i]) < asz:
        bsz = sum(b2L[j:i])
        asz=0
        j=i
print(asz+bsz)
"""
4
5 6 7 8
10 1 2 20

"""
    
SubtaskSumTestVerdictTimeMemory
base0/75
1Wrong answer0/018ms11344 KiB
2Time limit exceeded0/0370ms11812 KiB
3Wrong answer0/317ms11752 KiB
4Wrong answer0/417ms12392 KiB
5Wrong answer0/417ms12820 KiB
6Wrong answer0/417ms12784 KiB
7Wrong answer0/420ms13144 KiB
8Wrong answer0/323ms13052 KiB
9Wrong answer0/425ms13332 KiB
10Wrong answer0/432ms13424 KiB
11Wrong answer0/428ms13452 KiB
12Wrong answer0/520ms13272 KiB
13Wrong answer0/3185ms42224 KiB
14Time limit exceeded0/3358ms20676 KiB
15Time limit exceeded0/3368ms20208 KiB
16Time limit exceeded0/3372ms20588 KiB
17Time limit exceeded0/3361ms20600 KiB
18Time limit exceeded0/3453ms20336 KiB
19Time limit exceeded0/3381ms20560 KiB
20Time limit exceeded0/3377ms21648 KiB
21Wrong answer0/3171ms44040 KiB
22Time limit exceeded0/3374ms11604 KiB
23Time limit exceeded0/3356ms21348 KiB
24Wrong answer0/3184ms42828 KiB