QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#765176#8057. Best Carry Player 4yangjlWA 12ms10612kbPython3381b2024-11-20 12:53:232024-11-20 12:53:23

Judging History

你现在查看的是最新测评结果

  • [2024-11-20 12:53:23]
  • 评测
  • 测评结果:WA
  • 用时:12ms
  • 内存:10612kb
  • [2024-11-20 12:53:23]
  • 提交

answer

t=int(input())

def ilist():
    return list(map(int,input().split()))

for line in range(t):
    m=int(input())
    a=ilist()
    b=ilist()
    ans=0
    for i in range(1,m):
        tmp=min(a[i],b[m-i])
        a[i]-=tmp
        b[m-i]-=tmp
        ans+=tmp
    if ans:
        for i in range(m-1):
            ans+=min(a[i],b[m-1-i])    
    print(ans)        

詳細信息

Test #1:

score: 0
Wrong Answer
time: 12ms
memory: 10612kb

input:

5
2
1 2
3 4
3
1 0 1
0 1 0
4
1 0 0 1
1 1 1 1
5
123456 114514 1919810 233333 234567
20050815 998244353 0 0 0
10
5 3 5 3 2 4 2 4 1 5
9 9 8 2 4 4 3 5 3 0

output:

3
1
2
467900
26

result:

wrong answer 1st numbers differ - expected: '5', found: '3'