?
# | Author | Problem | Lang | Verdict | Time | Memory | Sent | Judged | |
---|---|---|---|---|---|---|---|---|---|
166405964 |
Practice: its_believe |
1709B - 11 | Python 3 | Accepted | 639 ms | 31592 KB | 2022-07-31 21:14:54 | 2022-07-31 21:14:57 |
_,(*a,),*r=(map(int,s.split())for s in open(0)) b=[[0],[0]] for x in b: for u,v in zip([0]+a,a):x+=x[-1]+max(0,u-v), max=min for s,t in r:l=b[s>t];print(l[t]-l[s])
?
?
?
?