QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#205959 | #7558. Abstract | ucup-team052# | WA | 15ms | 9100kb | Python3 | 584b | 2023-10-07 17:56:45 | 2023-10-07 18:00:50 |
Judging History
answer
n, m = map(int, input().split())
a = list(map(int, input().split()))
u = [0 for i in range(m)]
v = [0 for i in range(m)]
for i in range(m) :
u[i], v[i] = map(int, input().split())
u[i] = u[i] - 1
v[i] = v[i] - 1
ans = 0
while 1 :
flag = 0
for i in range(n) :
if a[i] != 0 :
flag = 1
break
if flag == 0 :
break
b = [0 for i in range(n)]
for i in range(n) :
b[i] = a[i]
a[i] = a[i] // 2
for i in range(m) :
a[v[i]] += b[u[i]]
ans = ans + 1
print(ans)
詳細信息
Test #1:
score: 100
Accepted
time: 7ms
memory: 9068kb
input:
3 2 1 1 1 1 2 2 3
output:
3
result:
ok 1 number(s): "3"
Test #2:
score: -100
Wrong Answer
time: 15ms
memory: 9100kb
input:
6 8 1 1 4 5 1 4 1 4 1 5 2 3 2 5 3 4 4 5 4 6 5 6
output:
12
result:
wrong answer 1st numbers differ - expected: '8', found: '12'