N =int(input())
p =list(map(int,input().split()))
t =list(map(int,input().split()))
d,s=[0]*100010,[0]*100010for i inrange(N):
d[i]= p[i]-t[i]for i inrange(N):
s[i]+= d[i]
s[i+1]-= d[i]
ans =0for i inrange(N+1):if s[i]>0:
ans += s[i]print(ans)
Data-driven adaptive dynamic programming schemes for non-zero-sum games of unknown discrete-time nonlinear systems,2018, He Jiang, Huaguang Zhang∗, Kun Zhang, Xiaohong Cui
博弈论、最优控制和强化学习解决离散时间 multi-player 非零和博…