problem_id stringlengths 6 6 | buggy_code stringlengths 8 526k | fixed_code stringlengths 12 526k | labels listlengths 0 15 ⌀ | buggy_submission_id int64 1 1.54M | fixed_submission_id int64 2 1.54M | user_id stringlengths 10 10 | language stringclasses 8
values |
|---|---|---|---|---|---|---|---|
p02623 | N,M,K = map(int,input().split())
A = list(map(int, input().split()))
B =list(map(int, input().split()))
sumA=[0]
sumB=[0]
for i in range(N):
sumA.append(sumA[-1]+A[i])
for i in range(M):
sumB.append(sumB[-1]+B[i])
total=0
startB=len(sumB)-1
for a in range(len(sumA)):
for b in range(startB,-1,-1):
if s... | N,M,K = map(int,input().split())
A = list(map(int, input().split()))
B =list(map(int, input().split()))
sumA=[0]
sumB=[0]
for i in range(N):
sumA.append(sumA[-1]+A[i])
for i in range(M):
sumB.append(sumB[-1]+B[i])
total=0
startB=len(sumB)-1
for a in range(len(sumA)):
for b in range(startB,-1,-1):
if s... | [
"call.add",
"call.arguments.change"
] | 333,639 | 333,640 | u029056424 | python |
p02623 | import bisect
N,M,K=map(int,input().split())
alist=list(map(int,input().split()))
blist=list(map(int,input().split()))
sum_alist=[0]
for i in range(N):
sum_alist.append(sum_alist[-1]+alist[i])
#print(sum_alist)
sum_blist=[0]
for i in range(M):
sum_blist.append(sum_blist[-1]+blist[i])
#print(sum_blist)
limit_a=bi... | import bisect
N,M,K=map(int,input().split())
alist=list(map(int,input().split()))
blist=list(map(int,input().split()))
sum_alist=[0]
for i in range(N):
sum_alist.append(sum_alist[-1]+alist[i])
#print(sum_alist)
sum_blist=[0]
for i in range(M):
sum_blist.append(sum_blist[-1]+blist[i])
#print(sum_blist)
limit_a=bi... | [
"call.arguments.change"
] | 333,641 | 333,642 | u203843959 | python |
p02623 | def main():
N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
AReqTime = [0]
BReqTime = [0]
for i in range(N):
AReqTime.append(AReqTime[i] + A[i])
for i in range(M):
BReqTime.append(BReqTime[i] + B[i])
j = M
... | def main():
N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
AReqTime = [0]
BReqTime = [0]
for i in range(N):
AReqTime.append(AReqTime[i] + A[i])
for i in range(M):
BReqTime.append(BReqTime[i] + B[i])
j = M
... | [
"control_flow.loop.range.bounds.upper.change",
"expression.operation.binary.add"
] | 333,645 | 333,646 | u790905630 | python |
p02623 | # -*- coding: utf-8 -*-
N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
sum_A = [0]
sum_B = [0]
for n in range(N):
sum_A.append(sum_A[n]+A[n])
for m in range(M):
sum_B.append(sum_B[m]+B[m])
max_j = M
max_book = 0
for i in range(N+1):
# Aの机でi冊読んだ... | # -*- coding: utf-8 -*-
N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
sum_A = [0]
sum_B = [0]
for n in range(N):
sum_A.append(sum_A[n]+A[n])
for m in range(M):
sum_B.append(sum_B[m]+B[m])
max_j = M
max_book = 0
for i in range(N+1):
# Aの机でi冊読んだ... | [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change"
] | 333,649 | 333,650 | u693025087 | python |
p02623 | def main():
N, M, K = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
if a[0] > K and b[0] > K:
return 0
a2=[0]
for i in a:a2.append(a2[-1]+i)
b2=[0]
for i in b:b2.append(b2[-1]+i)
ans = 0
j = M
for i in ran... | def main():
N, M, K = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
if a[0] > K and b[0] > K:
return 0
a2=[0]
for i in a:a2.append(a2[-1]+i)
b2=[0]
for i in b:b2.append(b2[-1]+i)
ans = 0
j = M
for i in ran... | [
"identifier.change",
"control_flow.branch.if.condition.change",
"control_flow.loop.condition.change"
] | 333,665 | 333,666 | u513519822 | python |
p02623 | N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
a, b = [0]*N, [0]*M
total = 0
for i in range(N):
total += A[i]
a[i] = total
a = [0] + a
total = 0
for i in range(M):
total += B[i]
b[i] = total
b = [0] + b
ans, j = 0, M
for i in range(N):
... | N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
a, b = [0]*N, [0]*M
total = 0
for i in range(N):
total += A[i]
a[i] = total
a = [0] + a
total = 0
for i in range(M):
total += B[i]
b[i] = total
b = [0] + b
ans, j = 0, M
for i in range(N+1):... | [
"control_flow.loop.range.bounds.upper.change",
"expression.operation.binary.add"
] | 333,669 | 333,670 | u896726004 | python |
p02623 | n, m, p = list(map(int, input().split()))
# a = list(map(int, input().split()))
#
# abc = [int(input()) for i in range(5)]
# a = int(input())
# w = list(map(int, input().split()))
# n, k = list(map(int, input().split()))
# a = list(map(int, input().split()))
# data = [list(map(int, input().split())) for i in range(n)]... | n, m, p = list(map(int, input().split()))
# a = list(map(int, input().split()))
#
# abc = [int(input()) for i in range(5)]
# a = int(input())
# w = list(map(int, input().split()))
# n, k = list(map(int, input().split()))
# a = list(map(int, input().split()))
# data = [list(map(int, input().split())) for i in range(n)]... | [
"call.arguments.change"
] | 333,699 | 333,700 | u696444274 | python |
p02623 | n,m,k=map(int,input().split())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
ans=0
aindex=n
bindex=m
acumsum = [0]
bcumsum = [0]
ab =0
for aa in range(n):
ab += a[aa]
acumsum.append(ab)# = ab
if ab>k:
aindex= aa
break
ab =0
for bb in range(m):
ab += b[bb]
bcumsum.append(ab)
if ... | n,m,k=map(int,input().split())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
ans=0
aindex=n
bindex=m
acumsum = [0]
bcumsum = [0]
ab =0
for aa in range(n):
ab += a[aa]
acumsum.append(ab)# = ab
if ab>k:
aindex= aa
break
ab =0
for bb in range(m):
ab += b[bb]
bcumsum.append(ab)
if ... | [
"call.add"
] | 333,709 | 333,710 | u521866787 | python |
p02623 | n,m,k=map(int,input().split())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
ans=0
aindex=n+1
bindex=m+1
acumsum = [0]
bcumsum = [0]
ab =0
for aa in range(n):
ab += a[aa]
acumsum.append(ab)# = ab
if ab>k:
aindex= aa
break
ab =0
for bb in range(m):
ab += b[bb]
bcumsum.append(ab)
... | n,m,k=map(int,input().split())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
ans=0
aindex=n
bindex=m
acumsum = [0]
bcumsum = [0]
ab =0
for aa in range(n):
ab += a[aa]
acumsum.append(ab)# = ab
if ab>k:
aindex= aa
break
ab =0
for bb in range(m):
ab += b[bb]
bcumsum.append(ab)
if ... | [
"expression.operation.binary.remove",
"assignment.value.change",
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change",
"control_flow.loop.range.bounds.upper.change"
] | 333,711 | 333,710 | u521866787 | python |
p02623 | N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
for i in range(1, len(A)):
A[i] += A[i - 1]
for i in range(1, len(B)):
B[i] += B[i - 1]
A.insert(0, 0)
B.insert(0, 0)
r = 0
for i, a in enumerate(A):
min_idx = 0
max_idx = len(B) - 1
while min... | N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
for i in range(1, len(A)):
A[i] += A[i - 1]
for i in range(1, len(B)):
B[i] += B[i - 1]
A.insert(0, 0)
B.insert(0, 0)
r = 0
for i, a in enumerate(A):
min_idx = 0
max_idx = len(B) - 1
while min... | [
"control_flow.loop.condition.change",
"control_flow.loop.for.condition.change",
"misc.off_by_one"
] | 333,751 | 333,752 | u987188835 | python |
p02623 | import sys
n,m,k=map(int,input().split())
a = [int(i) for i in input().split()]
b = [int(i) for i in input().split()]
ans = 1
c = [0]
d = [0]
for i in range(1,n+1):
c.append(c[i-1] + a[i-1])
if(c[i] > k):
c.pop()
break
for i in range(1,m+1):
d.append(d[i-1] + b[i-1])
if(d[i] > k):
... | import sys
n,m,k=map(int,input().split())
a = [int(i) for i in input().split()]
b = [int(i) for i in input().split()]
ans = 1
c = [0]
d = [0]
for i in range(1,n+1):
c.append(c[i-1] + a[i-1])
if(c[i] > k):
c.pop()
break
for i in range(1,m+1):
d.append(d[i-1] + b[i-1])
if(d[i] > k):
... | [
"identifier.change",
"variable_access.subscript.index.change",
"control_flow.loop.condition.change",
"call.add",
"call.arguments.change"
] | 333,755 | 333,756 | u920204936 | python |
p02623 | import itertools
n, m, k = [int(i) for i in input().split()]
a_list = [int(i) for i in input().split()]
b_list = [int(i) for i in input().split()]
a_acc = [0]
a_acc.extend(list(itertools.accumulate(a_list)))
b_acc = [0]
b_acc.extend(list(itertools.accumulate(b_list)))
ans = 0
j = m
for i in range(1, n+1):
if a_ac... | import itertools
n, m, k = [int(i) for i in input().split()]
a_list = [int(i) for i in input().split()]
b_list = [int(i) for i in input().split()]
a_acc = [0]
a_acc.extend(list(itertools.accumulate(a_list)))
b_acc = [0]
b_acc.extend(list(itertools.accumulate(b_list)))
ans = 0
j = m
for i in range(n+1):
if a_acc[i... | [
"call.arguments.change"
] | 333,767 | 333,768 | u230717961 | python |
p02623 |
import bisect
import numpy
n, m, k = map(int, input().split(" "))
a = list(map(int, input().split(" ")))
b = list(map(int, input().split(" ")))
cost_a = numpy.insert(numpy.cumsum(a), 0, 0)
cost_b = numpy.insert(numpy.cumsum(b), 0, 0)
ans = 0
j = len(cost_b) -1
for i in range(len(cost_a)):
for j in range( j, 0,... |
import bisect
import numpy
n, m, k = map(int, input().split(" "))
a = list(map(int, input().split(" ")))
b = list(map(int, input().split(" ")))
cost_a = numpy.insert(numpy.cumsum(a), 0, 0)
cost_b = numpy.insert(numpy.cumsum(b), 0, 0)
ans = 0
j = len(cost_b) -1
for i in range(len(cost_a)):
for j in range(j, -1,... | [
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change",
"expression.operation.unary.add",
"control_flow.loop.range.bounds.step.change"
] | 333,774 | 333,775 | u497805118 | python |
p02623 |
import bisect
import numpy
n, m, k = map(int, input().split(" "))
a = list(map(int, input().split(" ")))
b = list(map(int, input().split(" ")))
cost_a = numpy.insert(numpy.cumsum(a), 0, 0)
cost_b = numpy.insert(numpy.cumsum(b), 0, 0)
ans = 0
j = len(cost_b)
for i in range(len(cost_a)):
for j in range( j, 0, -1... |
import bisect
import numpy
n, m, k = map(int, input().split(" "))
a = list(map(int, input().split(" ")))
b = list(map(int, input().split(" ")))
cost_a = numpy.insert(numpy.cumsum(a), 0, 0)
cost_b = numpy.insert(numpy.cumsum(b), 0, 0)
ans = 0
j = len(cost_b) -1
for i in range(len(cost_a)):
for j in range(j, -1,... | [
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change",
"expression.operation.unary.add",
"control_flow.loop.range.bounds.step.change"
] | 333,777 | 333,775 | u497805118 | python |
p02623 |
if __name__ == "__main__":
N, M, K = list(map(int, input().split()))
A = list(map(int, input().split()))
B = list(map(int, input().split()))
ans, j = 0, M
a = [0]
b = [0]
for i in range(N):
a.append(a[i]+A[i])
for i in range(M):
b.append(b[i]+B[i])
... | if __name__ == "__main__":
N, M, K = list(map(int, input().split()))
A = list(map(int, input().split()))
B = list(map(int, input().split()))
ans, j = 0, M
a = [0]
b = [0]
for i in range(N):
a.append(a[i]+A[i])
for i in range(M):
b.append(b[i]+B[i])
... | [
"control_flow.branch.while.replace.add",
"control_flow.loop.if.replace.remove"
] | 333,778 | 333,779 | u660042112 | python |
p02623 | NMK=input().split(" ")
N=int(NMK[0])
M=int(NMK[1])
K=int(NMK[2])
def list2int(List):
out=[]
for i in range(len(List)):
out.append(int(List[i]))
return out
A=list2int(input().split(" "))
B=list2int(input().split(" "))
a=[0]
b=[0]
for i in range(N):
a.append(a[i]+A[i])
for i in range(M):
b.... | NMK=input().split(" ")
N=int(NMK[0])
M=int(NMK[1])
K=int(NMK[2])
def list2int(List):
out=[]
for i in range(len(List)):
out.append(int(List[i]))
return out
A=list2int(input().split(" "))
B=list2int(input().split(" "))
a=[0]
b=[0]
for i in range(N):
a.append(a[i]+A[i])
for i in range(M):
b.... | [
"control_flow.loop.range.bounds.upper.change",
"expression.operation.binary.add"
] | 333,780 | 333,781 | u407891541 | python |
p02623 | import sys
sys.setrecursionlimit(10**6)
n, M, k = map(int,input().split())
a_l = list(map(int,input().split()))
b_l = list(map(int,input().split()))
read_a = [0]*n
read_b = [0]*M
time = 0
ans = 0
memo = -1
for j in range(n):
if time + a_l[j] <= k:
time += a_l[j]
read_a[j] = 1
memo = j
... | import sys
sys.setrecursionlimit(10**6)
n, M, k = map(int,input().split())
a_l = list(map(int,input().split()))
b_l = list(map(int,input().split()))
read_a = [0]*n
read_b = [0]*M
time = 0
ans = 0
memo = -1
for j in range(n):
if time + a_l[j] <= k:
time += a_l[j]
read_a[j] = 1
memo = j
... | [
"call.arguments.add",
"call.arguments.change"
] | 333,784 | 333,785 | u363074342 | python |
p02623 | import sys
sys.setrecursionlimit(10**6)
n, M, k = map(int,input().split())
a_l = list(map(int,input().split()))
b_l = list(map(int,input().split()))
read_a = [0]*n
read_b = [0]*M
time = 0
ans = 0
memo = 0
for j in range(n):
if time + a_l[j] <= k:
time += a_l[j]
read_a[j] = 1
memo = j
... | import sys
sys.setrecursionlimit(10**6)
n, M, k = map(int,input().split())
a_l = list(map(int,input().split()))
b_l = list(map(int,input().split()))
read_a = [0]*n
read_b = [0]*M
time = 0
ans = 0
memo = -1
for j in range(n):
if time + a_l[j] <= k:
time += a_l[j]
read_a[j] = 1
memo = j
... | [
"assignment.value.change",
"expression.operation.unary.add"
] | 333,786 | 333,785 | u363074342 | python |
p02623 | from itertools import accumulate
N, M, K = map(int, input().split())
*A, = map(int, input().split())
*B, = map(int, input().split())
cumsum_A, cumsum_B = [0] + list(accumulate(A)), [0] + list(accumulate(B))
ans = 0
j = M
for i in range(N+1):
if cumsum_A[i] > K: break
while cumsum_A[i] + cumsum_B[j] >= K: j -= ... | from itertools import accumulate
N, M, K = map(int, input().split())
*A, = map(int, input().split())
*B, = map(int, input().split())
cumsum_A, cumsum_B = [0] + list(accumulate(A)), [0] + list(accumulate(B))
ans = 0
j = M
for i in range(N+1):
if cumsum_A[i] > K: break
while cumsum_A[i] + cumsum_B[j] > K: j -= 1... | [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 333,797 | 333,798 | u497046426 | python |
p02623 | N,M,K = map(int,input().split())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
S_A = [0] * (N + 1)
S_B = [0] * (M + 1)
for i in range(N):
S_A[i+1] = S_A[i] + A[i]
for i in range(M):
S_B[i+1] = S_B[i] + B[i]
ans = 0
a = 0
for i in range(M, -1, -1):
s = S_B[i]
while a<N:
if s + S_... | N,M,K = map(int,input().split())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
S_A = [0] * (N + 1)
S_B = [0] * (M + 1)
for i in range(N):
S_A[i+1] = S_A[i] + A[i]
for i in range(M):
S_B[i+1] = S_B[i] + B[i]
ans = 0
a = 0
for i in range(M, -1, -1):
s = S_B[i]
if s>K:
continue
w... | [
"control_flow.branch.if.add",
"control_flow.continue.add"
] | 333,805 | 333,806 | u268554510 | python |
p02623 | import sys
sys.setrecursionlimit(1 << 25)
read = sys.stdin.readline
ra = range
enu = enumerate
def exit(*argv, **kwarg):
print(*argv, **kwarg)
sys.exit()
def mina(*argv, sub=1): return list(map(lambda x: x - sub, argv))
# 受け渡されたすべての要素からsubだけ引く.リストを*をつけて展開しておくこと
def a_int(): return int(read())
def ints()... | import sys
sys.setrecursionlimit(1 << 25)
read = sys.stdin.readline
ra = range
enu = enumerate
def exit(*argv, **kwarg):
print(*argv, **kwarg)
sys.exit()
def mina(*argv, sub=1): return list(map(lambda x: x - sub, argv))
# 受け渡されたすべての要素からsubだけ引く.リストを*をつけて展開しておくこと
def a_int(): return int(read())
def ints()... | [
"control_flow.loop.for.condition.change",
"expression.operation.binary.remove"
] | 333,817 | 333,818 | u179169725 | python |
p02623 | import sys
sys.setrecursionlimit(1 << 25)
read = sys.stdin.readline
ra = range
enu = enumerate
def exit(*argv, **kwarg):
print(*argv, **kwarg)
sys.exit()
def mina(*argv, sub=1): return list(map(lambda x: x - sub, argv))
# 受け渡されたすべての要素からsubだけ引く.リストを*をつけて展開しておくこと
def a_int(): return int(read())
def ints()... | import sys
sys.setrecursionlimit(1 << 25)
read = sys.stdin.readline
ra = range
enu = enumerate
def exit(*argv, **kwarg):
print(*argv, **kwarg)
sys.exit()
def mina(*argv, sub=1): return list(map(lambda x: x - sub, argv))
# 受け渡されたすべての要素からsubだけ引く.リストを*をつけて展開しておくこと
def a_int(): return int(read())
def ints()... | [
"control_flow.loop.for.condition.change",
"expression.operation.binary.remove"
] | 333,819 | 333,818 | u179169725 | python |
p02623 | import sys
sys.setrecursionlimit(1 << 25)
read = sys.stdin.readline
ra = range
enu = enumerate
def exit(*argv, **kwarg):
print(*argv, **kwarg)
sys.exit()
def mina(*argv, sub=1): return list(map(lambda x: x - sub, argv))
# 受け渡されたすべての要素からsubだけ引く.リストを*をつけて展開しておくこと
def a_int(): return int(read())
def ints()... | import sys
sys.setrecursionlimit(1 << 25)
read = sys.stdin.readline
ra = range
enu = enumerate
def exit(*argv, **kwarg):
print(*argv, **kwarg)
sys.exit()
def mina(*argv, sub=1): return list(map(lambda x: x - sub, argv))
# 受け渡されたすべての要素からsubだけ引く.リストを*をつけて展開しておくこと
def a_int(): return int(read())
def ints()... | [
"control_flow.loop.for.condition.change",
"expression.operation.binary.remove"
] | 333,820 | 333,818 | u179169725 | python |
p02623 | def main():
N,M,K = map(int,input().split())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
a,b = [0],[0]
for i in range(N):
a.append(a[i] + A[i])
for i in range(N):
b.append(b[i] + B[i])
ans,j = 0,M
for i in range(N+1):
if a[i... | def main():
N,M,K = map(int,input().split())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
a,b = [0],[0]
for i in range(N):
a.append(a[i] + A[i])
for i in range(M):
b.append(b[i] + B[i])
ans,j = 0,M
for i in range(N+1):
if a[i... | [
"identifier.change",
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change"
] | 333,821 | 333,822 | u830588156 | python |
p02623 |
import sys
import math
import itertools
import collections
def solve(N,M,K,A,B):
accumA = [0,A.pop(0)]
accumB = [0,B.pop(0)]
for a in A:
accumA.append(accumA[-1] + a)
for b in B:
accumB.append(accumB[-1] + b)
ans = 0
j = M
for i in range(N + 1):
if a[i] > K:
... |
import sys
import math
import itertools
import collections
def solve(N,M,K,A,B):
accumA = [0,A.pop(0)]
accumB = [0,B.pop(0)]
for a in A:
accumA.append(accumA[-1] + a)
for b in B:
accumB.append(accumB[-1] + b)
ans = 0
j = M
for i in range(N + 1):
if accumA[i] > K:
... | [
"identifier.change",
"control_flow.branch.if.condition.change",
"control_flow.loop.condition.change"
] | 333,830 | 333,831 | u301624971 | python |
p02623 | import sys
input = sys.stdin.readline
from itertools import accumulate
N,M,K = map(int,input().split())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
a = [0]+list(accumulate(A))
b = [0]+list(accumulate(B))
ans,j = 0,M
for i in range(N+1):
if i > K:
break
while b[j] > K - a[i]:
... | import sys
input = sys.stdin.readline
from itertools import accumulate
N,M,K = map(int,input().split())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
a = [0]+list(accumulate(A))
b = [0]+list(accumulate(B))
ans,j = 0,M
for i in range(N+1):
if a[i] > K:
break
while b[j] > K - a[i]... | [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change"
] | 333,834 | 333,835 | u474423089 | python |
p02623 | n,m,k = map(int, input().split())
ln = list(map(int, input().split()))
lm = list(map(int, input().split()))
def csum(l,ll):
s = 0
res = [0] * ll
for i in range(ll):
s += l[i]
res[i] = s
return res
csln = csum(ln,n)
cslm = csum(lm,m)
import numpy as np
lk = [k-x for x in csln if k-x >... | n,m,k = map(int, input().split())
ln = list(map(int, input().split()))
lm = list(map(int, input().split()))
def csum(l,ll):
s = 0
res = [0] * ll
for i in range(ll):
s += l[i]
res[i] = s
return res
csln = csum(ln,n)
cslm = csum(lm,m)
import numpy as np
lk = [k] + [k-x for x in csln if... | [
"call.arguments.change"
] | 333,845 | 333,846 | u435480265 | python |
p02623 | N,M,K = map(int, input().split())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
S = [0]
Sum = 0
for i in range(N):
K = K - A[i]
if K >= 0:
Sum += 1
else:
K = K + A[i]
break
S.append(Sum)
for j in range(M):
K = K - B[j]
if K >= 0:
Sum += 1
else:
if i == 0:
... | N,M,K = map(int, input().split())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
S = [0]
Sum = 0
for i in range(N):
K = K - A[i]
if K >= 0:
Sum += 1
else:
K = K + A[i]
break
else:
i = N
S.append(Sum)
for j in range(M):
K = K - B[j]
if K >= 0:
Sum += 1
else:
... | [
"assignment.add"
] | 333,849 | 333,850 | u970497613 | python |
p02623 | import itertools
N,M,K = map(int,input().split())
A = [0]+list(map(int,input().split()))
B = [0]+list(map(int,input().split()))
SA = list(itertools.accumulate(A))
SB = list(itertools.accumulate(B))
ans = 0
j = len(B)-1
for i in range(len(SA)):
while(pt>=0):
if SA[i] + SB[j] <= K:
ans = max(ans,i... | import itertools
N,M,K = map(int,input().split())
A = [0]+list(map(int,input().split()))
B = [0]+list(map(int,input().split()))
SA = list(itertools.accumulate(A))
SB = list(itertools.accumulate(B))
ans = 0
j = len(B)-1
for i in range(len(SA)):
while(j>=0):
if SA[i] + SB[j] <= K:
ans = max(ans,i+... | [
"identifier.change",
"control_flow.loop.condition.change"
] | 333,851 | 333,852 | u709304134 | python |
p02623 | N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
ans = 0
t = 0
a = 0
b = 0
while True:
if not t + A[a] > K:
t += A[a]
a += 1
# print(a, t, A[a-1])
if a >= N:
break
else:
break
flug = True #全探索を行... | N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
ans = 0
t = 0
a = 0
b = 0
while True:
if not t + A[a] > K:
t += A[a]
a += 1
# print(a, t, A[a-1])
if a >= N:
break
else:
break
flug = True #全探索を行... | [
"control_flow.branch.if.add",
"control_flow.break.add"
] | 333,876 | 333,877 | u514390882 | python |
p02623 | from collections import deque
import bisect
N,M,K = list(map(int, input().split()))
As = list(map(int, input().split()))
Bs = list(map(int, input().split()))
#if(sum(As) + sum(Bs) <= K):
# print(N + M)
# exit()
Asruisekiwa = []
Bsruisekiwa = []
Asruisekiwa.append(As[0])
Bsruisekiwa.append(Bs[0])
for i, j in ... | from collections import deque
import bisect
N,M,K = list(map(int, input().split()))
As = list(map(int, input().split()))
Bs = list(map(int, input().split()))
#if(sum(As) + sum(Bs) <= K):
# print(N + M)
# exit()
Asruisekiwa = []
Bsruisekiwa = []
Asruisekiwa.append(As[0])
Bsruisekiwa.append(Bs[0])
for i, j in ... | [
"assignment.value.change",
"identifier.change"
] | 333,882 | 333,883 | u655663334 | python |
p02623 | N, M, K = map(int,input().split())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
a = -1
b = -1
total = 0
ans = 0
while a<len(A)-1:
if total+A[a+1] > K:
break
a+=1
total+=A[a]
while b<len(B)-1:
if total+B[b+1] > K:
break
b+=1
total+=B[b]
ans = a+b... | N, M, K = map(int,input().split())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
a = -1
b = -1
total = 0
ans = 0
while a<len(A)-1:
if total+A[a+1] > K:
break
a+=1
total+=A[a]
while b<len(B)-1:
if total+B[b+1] > K:
break
b+=1
total+=B[b]
ans = a+b... | [
"assignment.value.change",
"identifier.replace.add",
"literal.replace.remove"
] | 333,884 | 333,885 | u760771686 | python |
p02623 | N,M,K=list(map(int,input().split()))
A=list(map(int,input().split()))
B=list(map(int,input().split()))
from itertools import accumulate
from collections import deque
A=deque(list(accumulate(A)))
B=deque(list(accumulate(B)))
A.appendleft(0)
B.appendleft(0)
ans1=0
for i in range(N+1):
if A[i]>K:
ans1=i
... |
N,M,K=list(map(int,input().split()))
A=list(map(int,input().split()))
B=list(map(int,input().split()))
from itertools import accumulate
from collections import deque
A=deque(list(accumulate(A)))
B=deque(list(accumulate(B)))
A.appendleft(0)
B.appendleft(0)
ans1=0
for i in range(N+1):
if A[i]>K:
ans1=i-1
... | [
"assignment.change",
"control_flow.loop.range.bounds.upper.change",
"expression.operation.binary.add"
] | 333,887 | 333,888 | u857547702 | python |
p02623 | n,m,k = map(int, input().split(' '))
a = list(map(int,input().split(' ')))
b = list(map(int,input().split(' ')))
lim = n+m
i = 0
cnt_a = 0
loop = len(a)
while k > 0 and i < loop:
if k - a[i] >= 0:
k -= a[i]
i += 1
cnt_a += 1
else:
break
i = 0
cnt_b = 0
loop = len(b)
while k > ... | n,m,k = map(int, input().split(' '))
a = list(map(int,input().split(' ')))
b = list(map(int,input().split(' ')))
lim = n+m
i = 0
cnt_a = 0
loop = len(a)
while k > 0 and i < loop:
if k - a[i] >= 0:
k -= a[i]
i += 1
cnt_a += 1
else:
break
i = 0
cnt_b = 0
loop = len(b)
while k > ... | [
"identifier.change",
"control_flow.loop.condition.change"
] | 333,898 | 333,899 | u582759840 | python |
p02623 | def count_books(books, limit):
num_books = len(books)
total_time = 0
for i, time in enumerate(books):
if total_time + time > limit:
num_books = i
break
total_time += time
return [num_books, total_time]
def main():
N, M, K = map(int, input().split())
A = l... | def count_books(books, limit):
num_books = len(books)
total_time = 0
for i, time in enumerate(books):
if total_time + time > limit:
num_books = i
break
total_time += time
return [num_books, total_time]
def main():
N, M, K = map(int, input().split())
A = l... | [
"expression.operation.binary.remove",
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 333,911 | 333,910 | u224346910 | python |
p02623 | N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
A_time = [0]
time = 0
for i in range(N):
time += A[i]
A_time.append(time)
B_time = [0]
time = 0
for i in range(M):
time += B[i]
B_time.append(time)
def binarySearch(key):
left = -1
right ... | N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
A_time = [0]
time = 0
for i in range(N):
time += A[i]
A_time.append(time)
B_time = [0]
time = 0
for i in range(M):
time += B[i]
B_time.append(time)
def binarySearch(key):
left = -1
right ... | [
"control_flow.branch.if.add",
"control_flow.break.add"
] | 333,945 | 333,946 | u345778634 | python |
p02623 | def main():
import bisect
n,m,k = map(int,input().split())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
A_ac = [0]
B_ac = [0]
a_ac = 0
b_ac = 0
for a in A:
a_ac+=a
A_ac.append(a_ac)
for b in B:
b_ac+=b
B_ac.append(b_ac)
... | def main():
import bisect
n,m,k = map(int,input().split())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
A_ac = [0]
B_ac = [0]
a_ac = 0
b_ac = 0
for a in A:
a_ac+=a
A_ac.append(a_ac)
for b in B:
b_ac+=b
B_ac.append(b_ac)
... | [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 333,958 | 333,959 | u474561976 | python |
p02623 | def main():
import bisect
n,m,k = map(int,input().split())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
A_ac = [0]
B_ac = [0]
a_ac = 0
b_ac = 0
for a in A:
a_ac+=a
A_ac.append(a_ac)
for b in B:
b_ac+=b
B_ac.append(b_ac)
... | def main():
import bisect
n,m,k = map(int,input().split())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
A_ac = [0]
B_ac = [0]
a_ac = 0
b_ac = 0
for a in A:
a_ac+=a
A_ac.append(a_ac)
for b in B:
b_ac+=b
B_ac.append(b_ac)
... | [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 333,960 | 333,959 | u474561976 | python |
p02623 | import bisect
n, m, k = map(int, input().split())
aList = list(map(int, input().split()))
bList = list(map(int, input().split()))
cList = [0]
dList = [0]
for a in aList:
t = a + cList[-1]
if t <= k:
cList.append(a + cList[-1])
else:
break
for b in bList:
t = b + dList[-1]
if t <= k:... | import bisect
n, m, k = map(int, input().split())
aList = list(map(int, input().split()))
bList = list(map(int, input().split()))
cList = [0]
dList = [0]
for a in aList:
t = a + cList[-1]
if t <= k:
cList.append(a + cList[-1])
else:
break
for b in bList:
t = b + dList[-1]
if t <= k:... | [
"call.remove"
] | 333,965 | 333,966 | u384094369 | python |
p02623 | n, m, k = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
ans = 0
# もしすべてaから選んだ場合
time = k
aOnly = 0
for i in range(len(a)):
time -= a[i]
if time < 0:
time += a[i]
i -= 1
break
aOnly += 1
a_idx = i
b_idx = -1
for i in range(len(b)):... | n, m, k = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
ans = 0
# もしすべてaから選んだ場合
time = k
aOnly = 0
for i in range(len(a)):
time -= a[i]
if time < 0:
time += a[i]
i -= 1
break
aOnly += 1
a_idx = i
b_idx = -1
for i in range(len(b)):... | [
"identifier.change",
"variable_access.subscript.index.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 333,991 | 333,990 | u149991748 | python |
p02623 | from itertools import accumulate
N, M, K = map(int, input().split())
As = [0] + list(map(int, input().split()))
Bs = [0] + list(map(int, input().split()))
csum_A = list(accumulate(As))
csum_B = list(accumulate(Bs))
ok = 0
ng = N + M + 2
while ng - ok > 1:
mid = (ng + ok) // 2
min_time = 10 ** 9 + 10
for t ... | from itertools import accumulate
N, M, K = map(int, input().split())
As = [0] + list(map(int, input().split()))
Bs = [0] + list(map(int, input().split()))
csum_A = list(accumulate(As))
csum_B = list(accumulate(Bs))
ok = 0
ng = N + M + 2
while ng - ok > 1:
mid = (ng + ok) // 2
min_time = 10 ** 9 + 10
for t ... | [
"expression.operation.binary.add"
] | 334,000 | 334,001 | u034128150 | python |
p02623 | from itertools import accumulate
N, M, K = map(int, input().split())
As = [0] + list(map(int, input().split()))
Bs = [0] + list(map(int, input().split()))
csum_A = list(accumulate(As))
csum_B = list(accumulate(Bs))
ok = 0
ng = N + M + 2
while ng - ok > 1:
mid = (ng + ok) // 2
min_time = 10 ** 9
for t in ra... | from itertools import accumulate
N, M, K = map(int, input().split())
As = [0] + list(map(int, input().split()))
Bs = [0] + list(map(int, input().split()))
csum_A = list(accumulate(As))
csum_B = list(accumulate(Bs))
ok = 0
ng = N + M + 2
while ng - ok > 1:
mid = (ng + ok) // 2
min_time = 10 ** 9 + 10
for t ... | [
"assignment.change",
"expression.operation.binary.add"
] | 334,002 | 334,001 | u034128150 | python |
p02623 | import itertools
import bisect
N, M, K = map(int,input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
A_ = list(itertools.accumulate(A))
B_ = list(itertools.accumulate(B))
l = len(A_)
ans = max(ans, bisect.bisect_right(B_, K))
for idx, i in enumerate(A_):
if i <= K:
... | import itertools
import bisect
N, M, K = map(int,input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
A_ = list(itertools.accumulate(A))
B_ = list(itertools.accumulate(B))
ans = 0
l = len(A_)
ans = max(ans, bisect.bisect_right(B_, K))
for idx, i in enumerate(A_):
if i <= K:
... | [
"assignment.add"
] | 334,030 | 334,031 | u735891571 | python |
p02623 | n, m, k = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
tmp = []
s = 0
for i in a:
if s + i <= k:
tmp.append(i)
s += i
else:
break
a = tmp
tmp = []
s = 0
for i in b:
if s + i <= k:
tmp.append(i)
s += i
else:
... | n, m, k = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
tmp = []
s = 0
for i in a:
if s + i <= k:
tmp.append(i)
s += i
else:
break
a = tmp
tmp = []
s = 0
for i in b:
if s + i <= k:
tmp.append(i)
s += i
else:
... | [
"call.remove"
] | 334,042 | 334,043 | u892340697 | python |
p02623 | n, m, k = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
tmp = []
s = 0
for i in a:
if s + i <= k:
tmp.append(i)
s += i
a = tmp
tmp = []
s = 0
for i in b:
if s + i <= k:
tmp.append(i)
s += i
b = tmp
line = b[::-1] + a
ans = 0
r... | n, m, k = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
tmp = []
s = 0
for i in a:
if s + i <= k:
tmp.append(i)
s += i
else:
break
a = tmp
tmp = []
s = 0
for i in b:
if s + i <= k:
tmp.append(i)
s += i
else:
... | [
"control_flow.break.add"
] | 334,044 | 334,043 | u892340697 | python |
p02623 | M,N,K = [int(hoge) for hoge in input().split()]
A = [int(hoge) for hoge in input().split()]
B = [int(hoge) for hoge in input().split()]
S = 0
Abook = 0
Bbook = 0
curbook = 0
for a in A:
if S + a <= K:
Abook += 1
curbook += 1
S += a
nextB = 0
for n,b in enumerate(B):
if S + b <= K:
... | M,N,K = [int(hoge) for hoge in input().split()]
A = [int(hoge) for hoge in input().split()]
B = [int(hoge) for hoge in input().split()]
S = 0
Abook = 0
Bbook = 0
curbook = 0
for a in A:
if S + a <= K:
Abook += 1
curbook += 1
S += a
else:
break
nextB = 0
for n,b in enumerate(B):
... | [
"control_flow.break.add"
] | 334,045 | 334,046 | u268516119 | python |
p02623 | import bisect
N, M, K = map(int, input().split())
A = [int(i) for i in input().split()]
B = [int(i) for i in input().split()]
WA = [0] * (N + 1)
WB = [0] * (M + 1)
for i in range(N):
WA[i + 1] = WA[i] + A[i]
for j in range(M):
WB[j + 1] = WB[j] + B[j]
ma = 0
for i in range(1, N + 1):
if WA[i] > K:
... | import bisect
N, M, K = map(int, input().split())
A = [int(i) for i in input().split()]
B = [int(i) for i in input().split()]
WA = [0] * (N + 1)
WB = [0] * (M + 1)
for i in range(N):
WA[i + 1] = WA[i] + A[i]
for j in range(M):
WB[j + 1] = WB[j] + B[j]
ma = 0
last = False
for i in range(0, N + 1):
if WA[i... | [
"literal.number.integer.change",
"call.arguments.change",
"control_flow.loop.range.bounds.lower.change"
] | 334,071 | 334,072 | u652583512 | python |
p02623 | n,m,k = map(int,input().split())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
s_a = [0]*(n+1)
s_b = [0]*(m+1)
for i in range(1,n+1):
s_a[i] = s_a[i-1] + a[i-1]
for i in range(1,m+1):
s_b[i] = s_b[i-1] + b[i-1]
import bisect
Sa = bisect.bisect_right(s_a,k) -1
Sb = bisect.bisect_right(s_b... | n,m,k = map(int,input().split())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
s_a = [0]*(n+1)
s_b = [0]*(m+1)
for i in range(1,n+1):
s_a[i] = s_a[i-1] + a[i-1]
for i in range(1,m+1):
s_b[i] = s_b[i-1] + b[i-1]
import bisect
Sa = bisect.bisect_right(s_a,k) -1
Sb = bisect.bisect_right(s_b... | [
"call.add",
"call.arguments.add"
] | 334,080 | 334,081 | u614181788 | python |
p02623 | import bisect
n, m, k = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
sa = [0] * (n+1)
for i in range(n):
sa[i+1] = sa[i] + a[i]
sb = [0] * (m+1)
for i in range(m):
sb[i+1] = sb[i] + b[i]
ans = 0
for i in range(1,n+1):
if sa[i] > k:
break
bi =... | import bisect
n, m, k = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
sa = [0] * (n+1)
for i in range(n):
sa[i+1] = sa[i] + a[i]
sb = [0] * (m+1)
for i in range(m):
sb[i+1] = sb[i] + b[i]
ans = 0
for i in range(n+1):
if sa[i] > k:
break
bi = b... | [
"call.arguments.change"
] | 334,094 | 334,095 | u382423941 | python |
p02623 | from collections import *
import sys
from bisect import *
input=sys.stdin.readline
from math import *
t=1
while(t):
t-=1
n,m,k=map(int,input().split())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
prea=[a[0]]
preb=[b[0]]
for i in range(1,n):
prea.append(prea[-1]+... | from collections import *
import sys
from bisect import *
input=sys.stdin.readline
from math import *
t=1
while(t):
t-=1
n,m,k=map(int,input().split())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
prea=[a[0]]
preb=[b[0]]
for i in range(1,n):
prea.append(prea[-1]+... | [
"identifier.change",
"variable_access.subscript.index.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 334,118 | 334,119 | u719217609 | python |
p02623 | # C
import itertools
import bisect
n, m, k = map(int, input().split())
a_l = [int(x) for x in input().split()]
b_l = [int(x) for x in input().split()]
cumsuma_l = list(itertools.accumulate(a_l))
cumsumb_l = list(itertools.accumulate(b_l))
_idx = bisect.bisect_left(cumsumb_l, k)
if _idx == m or cumsumb_l[_idx] != _... | # C
import itertools
import bisect
n, m, k = map(int, input().split())
a_l = [int(x) for x in input().split()]
b_l = [int(x) for x in input().split()]
cumsuma_l = list(itertools.accumulate(a_l))
cumsumb_l = list(itertools.accumulate(b_l))
_idx = bisect.bisect_left(cumsumb_l, k)
if _idx == m or cumsumb_l[_idx] != k... | [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 334,132 | 334,133 | u001769145 | python |
p02623 | n,m,k = map(int,input().split())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
from itertools import accumulate
a = list(accumulate(a))
b = list(accumulate(b))
from collections import deque
u = deque([0])
a.append(0)
import bisect
for i in range(n+1):
if k-a[i]>=0:
index = bisect.... | n,m,k = map(int,input().split())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
from itertools import accumulate
a = list(accumulate(a))
b = list(accumulate(b))
from collections import deque
u = deque([0])
a.insert(0,0)
import bisect
for i in range(n+1):
if k-a[i]>=0:
index = bisec... | [
"identifier.change",
"call.arguments.add",
"assignment.value.change"
] | 334,138 | 334,139 | u182178426 | python |
p02623 | import sys
input = sys.stdin.readline
n,m,k = map(int,input().split())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
ans = 0
ans0 = 0
ans1 = 0
for i in range(n):
if A[i] + ans0 <= k:
ans0 += A[i]
ans1 += 1
else:
break
ind = ans1-1
jnd = 0
for i in range(m):
... | import sys
input = sys.stdin.readline
n,m,k = map(int,input().split())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
ans = 0
ans0 = 0
ans1 = 0
for i in range(n):
if A[i] + ans0 <= k:
ans0 += A[i]
ans1 += 1
else:
break
ind = ans1-1
jnd = 0
for i in range(m):
... | [] | 334,148 | 334,147 | u325227960 | python |
p02623 | import sys
import os
import itertools
import numpy as np
from collections import deque
def main():
if os.getenv("ENV")=='LOCAL':
sys.stdin = open(os.path.dirname(__file__)+'/input.txt', 'r')
N,M,K=map(int, input().split())
A=list(map(int, input().split()))
B=list(map(int, input().split()))
... | import sys
import os
import itertools
import numpy as np
from collections import deque
def main():
if os.getenv("ENV")=='LOCAL':
sys.stdin = open(os.path.dirname(__file__)+'/input.txt', 'r')
N,M,K=map(int, input().split())
A=list(map(int, input().split()))
B=list(map(int, input().split()))
... | [
"assignment.value.change",
"expression.operation.unary.add"
] | 334,170 | 334,171 | u077003677 | python |
p02623 | import math
#import numpy as np
import queue
from collections import deque,defaultdict
import heapq as hpq
from sys import stdin,setrecursionlimit
#from scipy.sparse.csgraph import dijkstra
#from scipy.sparse import csr_matrix
ipt = stdin.readline
setrecursionlimit(10**7)
def main():
n,m,k = map(int,ipt().split())... | import math
#import numpy as np
import queue
from collections import deque,defaultdict
import heapq as hpq
from sys import stdin,setrecursionlimit
#from scipy.sparse.csgraph import dijkstra
#from scipy.sparse import csr_matrix
ipt = stdin.readline
setrecursionlimit(10**7)
def main():
n,m,k = map(int,ipt().split())... | [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change"
] | 334,193 | 334,194 | u169350228 | python |
p02623 | N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
time = 0
ans_a = 0
ans_b = 0
for i in range(N):
if time + A[i] > K:
break
else:
time += A[i]
ans_a += 1
for i in range(M):
if time + B[i] > K:
break
else:
t... | N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
time = 0
ans_a = 0
ans_b = 0
for i in range(N):
if time + A[i] > K:
break
else:
time += A[i]
ans_a += 1
for i in range(M):
if time + B[i] > K:
break
else:
t... | [
"call.add"
] | 334,197 | 334,198 | u325282913 | python |
p02623 | import sys
import heapq
import math
import fractions
import bisect
import itertools
from collections import Counter
from collections import deque
from operator import itemgetter
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))
n... | import sys
import heapq
import math
import fractions
import bisect
import itertools
from collections import Counter
from collections import deque
from operator import itemgetter
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))
n... | [
"assignment.value.change",
"identifier.change"
] | 334,212 | 334,213 | u024782094 | python |
p02623 | import sys
import heapq
import math
import fractions
import bisect
import itertools
from collections import Counter
from collections import deque
from operator import itemgetter
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))
n... | import sys
import heapq
import math
import fractions
import bisect
import itertools
from collections import Counter
from collections import deque
from operator import itemgetter
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))
n... | [
"assignment.value.change",
"identifier.change",
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change",
"expression.operation.unary.add",
"control_flow.loop.range.bounds.step.change"
] | 334,214 | 334,213 | u024782094 | python |
p02623 | import sys
input=sys.stdin.readline
sys.setrecursionlimit(10 ** 8)
from itertools import accumulate
from itertools import permutations
from itertools import combinations
from collections import defaultdict
from collections import Counter
import fractions
import math
from collections import deque
from bisect import bise... | import sys
input=sys.stdin.readline
sys.setrecursionlimit(10 ** 8)
from itertools import accumulate
from itertools import permutations
from itertools import combinations
from collections import defaultdict
from collections import Counter
import fractions
import math
from collections import deque
from bisect import bise... | [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 334,233 | 334,234 | u201387466 | python |
p02623 | N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
from bisect import bisect_right
dpa = [0]
for a in A:
dpa.append(dpa[-1]+a)
dpb = [0]
for b in B:
dpb.append(dpb[-1]+b)
ans = 0
for i in range(1, N+1):
t = dpa[i]
if t > K:
break
j = b... | N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
from bisect import bisect_right
dpa = [0]
for a in A:
dpa.append(dpa[-1]+a)
dpb = [0]
for b in B:
dpb.append(dpb[-1]+b)
ans = 0
for i in range(N+1):
t = dpa[i]
if t > K:
break
j = bise... | [
"call.arguments.change"
] | 334,246 | 334,247 | u219417113 | python |
p02623 | import sys
from bisect import bisect_right, bisect_left
n, m, k = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
ap = [0 for i in range(n)]
bp = [0 for j in range(m)]
for i in range(n):
if i == 0:
ap[i] = a[i]
else:
ap[i] = a[i] + ap[i - 1]
for i in range(m)... | import sys
from bisect import bisect_right, bisect_left
n, m, k = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
ap = [0 for i in range(n)]
bp = [0 for j in range(m)]
for i in range(n):
if i == 0:
ap[i] = a[i]
else:
ap[i] = a[i] + ap[i - 1]
for i in range(m)... | [
"assignment.change"
] | 334,258 | 334,259 | u188093234 | python |
p02623 | from sys import stdin
input = stdin.readline
n, m, k = map(int, input().split())
a = [int(x) for x in input().split()]
b = [int(x) for x in input().split()]
cnt = 0
idx = 0
res = [0]
na, nb = [0, a[0]], [0, b[0]]
for x in range(1, n):
na.append(na[-1] + a[x])
for x in range(1, m):
nb.append(nb[-1] + b[x])
... | from sys import stdin
input = stdin.readline
n, m, k = map(int, input().split())
a = [int(x) for x in input().split()]
b = [int(x) for x in input().split()]
cnt = 0
idx = 0
res = [0]
na, nb = [0, a[0]], [0, b[0]]
for x in range(1, n):
na.append(na[-1] + a[x])
for x in range(1, m):
nb.append(nb[-1] + b[x])
... | [
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change",
"expression.operation.unary.add",
"control_flow.loop.range.bounds.step.change"
] | 334,262 | 334,263 | u304974600 | python |
p02623 | # -*- coding: utf-8 -*-
N,M,K=map(int,input().split())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
ans=0
T=0
for i in range(N):
T+=A[i]
if T > K:
T-=A[i]
ans-=1
break
else:
ans+=1
R=[]
R.append(ans)
n=ans
m=0
while(1):
while(1):
if m>=M: bre... | # -*- coding: utf-8 -*-
N,M,K=map(int,input().split())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
ans=0
T=0
for i in range(N):
T+=A[i]
if T > K:
T-=A[i]
break
else:
ans+=1
R=[]
R.append(ans)
n=ans
m=0
while(1):
while(1):
if m>=M: break
T+=B... | [] | 334,330 | 334,331 | u159723084 | python |
p02623 | # -*- coding: utf-8 -*-
N,M,K=map(int,input().split())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
ans=0
T=0
for i in range(N):
T+=A[i]
if T > K:
T-=A[i]
break
else:
ans+=1
R=[]
R.append(ans)
n=ans-1
m=0
while(1):
while(1):
if m>=M: break
T+... | # -*- coding: utf-8 -*-
N,M,K=map(int,input().split())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
ans=0
T=0
for i in range(N):
T+=A[i]
if T > K:
T-=A[i]
break
else:
ans+=1
R=[]
R.append(ans)
n=ans
m=0
while(1):
while(1):
if m>=M: break
T+=B... | [
"expression.operation.binary.remove"
] | 334,332 | 334,331 | u159723084 | python |
p02623 | # -*- coding: utf-8 -*-
N,M,K=map(int,input().split())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
ans=0
T=0
for i in range(N):
T+=A[i]
if T > K:
T-=A[i]
break
else:
ans+=1
R=[]
R.append(ans)
n=ans-1
m=0
while(1):
while(1):
if m>=M: break
T+... | # -*- coding: utf-8 -*-
N,M,K=map(int,input().split())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
ans=0
T=0
for i in range(N):
T+=A[i]
if T > K:
T-=A[i]
break
else:
ans+=1
R=[]
R.append(ans)
n=ans
m=0
while(1):
while(1):
if m>=M: break
T+=B... | [
"expression.operation.binary.remove"
] | 334,333 | 334,331 | u159723084 | python |
p02623 | N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
index = 0
index2 = 0
stackedTime = 0
while(index<N and stackedTime + A[index] <= K):
stackedTime += A[index]
index += 1
while(index2 < M and stackedTime + B[index2] <= K):
stackedTime += B[index2]
ind... | N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
index = 0
index2 = 0
stackedTime = 0
while(index<N and stackedTime + A[index] <= K):
stackedTime += A[index]
index += 1
while(index2 < M and stackedTime + B[index2] <= K):
stackedTime += B[index2]
ind... | [
"identifier.change",
"variable_access.subscript.index.change"
] | 334,350 | 334,351 | u539639881 | python |
p02623 | # -*- coding: utf-8 -*-
import sys
import math
import os
import itertools
import string
import heapq
import _collections
from collections import Counter
from collections import defaultdict
from collections import deque
from functools import lru_cache
import bisect
import re
import queue
import decimal
class Scanner()... | # -*- coding: utf-8 -*-
import sys
import math
import os
import itertools
import string
import heapq
import _collections
from collections import Counter
from collections import defaultdict
from collections import deque
from functools import lru_cache
import bisect
import re
import queue
import decimal
class Scanner()... | [
"call.add",
"call.arguments.change"
] | 334,358 | 334,359 | u303039933 | python |
p02623 | N,M,K=map(int,input().split())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
A=[0]+A
B=[0]+B
from itertools import accumulate
AA=list(accumulate(A))
BB=list(accumulate(B))
a,b=0,0
import bisect
for i in range(N+1):
a=i
b=bisect.bisect_right(BB,K-AA[i])-1
if b==-1:
continue
... | N,M,K=map(int,input().split())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
A=[0]+A
B=[0]+B
from itertools import accumulate
AA=list(accumulate(A))
BB=list(accumulate(B))
count=0
a,b=0,0
import bisect
for i in range(N+1):
a=i
b=bisect.bisect_right(BB,K-AA[i])-1
if b==-1:
cont... | [
"assignment.add"
] | 334,379 | 334,380 | u614875193 | python |
p02623 | import math
import time
from collections import defaultdict, deque
from sys import stdin, stdout
from bisect import bisect_left, bisect_right,bisect
n,m,k=map(int,stdin.readline().split())
a=list(map(int,stdin.readline().split()))
b=list(map(int,stdin.readline().split()))
prea=[]
ans=0
for i in a:
ans+=i
prea.... | import math
import time
from collections import defaultdict, deque
from sys import stdin, stdout
from bisect import bisect_left, bisect_right,bisect
n,m,k=map(int,stdin.readline().split())
a=list(map(int,stdin.readline().split()))
b=list(map(int,stdin.readline().split()))
prea=[]
ans=0
for i in a:
ans+=i
prea.... | [
"assignment.value.change",
"identifier.replace.add",
"literal.replace.remove",
"call.arguments.add"
] | 334,394 | 334,395 | u021114240 | python |
p02623 | N, M, K = map(int,input().split())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
ma = 0
mb = 0
i=0
j=0
flag = True
while ma + A[i] <= K:
ma += A[i]
i += 1
if i == len(A):
break
while mb + B[j] <= K - ma:
mb += B[j]
j += 1
if j == len(B):
flag = False
break
ans = i +... | N, M, K = map(int,input().split())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
ma = 0
mb = 0
i=0
j=0
flag = True
while ma + A[i] <= K:
ma += A[i]
i += 1
if i == len(A):
break
while mb + B[j] <= K - ma:
mb += B[j]
j += 1
if j == len(B):
flag = False
break
ans = i +... | [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 334,420 | 334,421 | u923172145 | python |
p02623 | from itertools import accumulate
from bisect import bisect_left
def resolve():
n, m, k = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
aac = [0] + list(accumulate(a))
bbc = [0] + list(accumulate(b))
ans = 0
for i, aa in enumerate(aac):
... | from itertools import accumulate
from bisect import bisect
def resolve():
n, m, k = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
aac = [0] + list(accumulate(a))
bbc = [0] + list(accumulate(b))
ans = 0
for i, aa in enumerate(aac):
... | [
"identifier.change",
"assignment.value.change",
"call.function.change"
] | 334,428 | 334,429 | u298297089 | python |
p02623 | import bisect
N,M,K = map(int,input().split())
A = [int(i) for i in input().split()]
B = [int(i) for i in input().split()]
bsum = [0]
for b in B:
bsum.append(bsum[-1]+b)
ans = bisect.bisect_left(bsum,K) -1
asum = 0
for n,a in enumerate(A):
asum += a
if asum > K:
break
m = bisect.bisect_right(b... | import bisect
N,M,K = map(int,input().split())
A = [int(i) for i in input().split()]
B = [int(i) for i in input().split()]
bsum = [0]
for b in B:
bsum.append(bsum[-1]+b)
ans = bisect.bisect_right(bsum,K) -1
asum = 0
for n,a in enumerate(A):
asum += a
if asum > K:
break
m = bisect.bisect_right(... | [
"assignment.value.change",
"identifier.change",
"expression.operation.binary.change"
] | 334,452 | 334,453 | u262869085 | python |
p02623 | import bisect
N, M, K = list(map(int, input().split(" ")))
A = list(map(int, input().split(" ")))
B = list(map(int, input().split(" ")))
asum = [0]
for a in A:
asum.append(asum[-1] + a)
bsum = [0]
for b in B:
bsum.append(bsum[-1] + b)
ans = 0
for i, a in enumerate(asum):
btime = K - a
if btime > 0:
... | import bisect
N, M, K = list(map(int, input().split(" ")))
A = list(map(int, input().split(" ")))
B = list(map(int, input().split(" ")))
asum = [0]
for a in A:
asum.append(asum[-1] + a)
bsum = [0]
for b in B:
bsum.append(bsum[-1] + b)
ans = 0
for i, a in enumerate(asum):
btime = K - a
if btime < 0:
... | [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 334,481 | 334,482 | u248967559 | python |
p02623 | import bisect
N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
SA = [0]*(N+1)
SB = [0]*(M+1)
T = 0
ans = 0
for i in range(N):
SA[i+1] = SA[i] + A[i]
for i in range(M):
SB[i+1] = SB[i] + B[i]
for i in range(1, N+1):
if SA[i] > K:
break
... | import bisect
N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
SA = [0]*(N+1)
SB = [0]*(M+1)
T = 0
ans = 0
for i in range(N):
SA[i+1] = SA[i] + A[i]
for i in range(M):
SB[i+1] = SB[i] + B[i]
for i in range(N+1):
if SA[i] > K:
break
... | [
"call.arguments.change"
] | 334,529 | 334,530 | u814986259 | python |
p02623 | N,M,K = map(int,input().split())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
a = [0]*N
for i in range(N):
a[i] = A[i]+a[i-1]
b = [0]*M
for i in range(M):
b[i] = B[i]+b[i-1]
a = [0]+a
b = [0]+b
ans = 0
for i in range(N+1):
c = a[i]
if K-c>=0:
j = bisect(b,K-c)
a... | from bisect import bisect
N,M,K = map(int,input().split())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
a = [0]*N
for i in range(N):
a[i] = A[i]+a[i-1]
b = [0]*M
for i in range(M):
b[i] = B[i]+b[i-1]
a = [0]+a
b = [0]+b
ans = 0
for i in range(N+1):
c = a[i]
if K-c>=0:
j... | [] | 334,560 | 334,561 | u170201762 | python |
p02618 | import sys
input = sys.stdin.buffer.readline
import numpy as np
D = int(input())
c = np.array(input().split(), dtype=np.int32)
s = np.array([input().split() for _ in range(D)], dtype=np.int32)
last = np.zeros(26, dtype=np.int32)
ans = []
point = 0
for i in range(D):
down = (i+1-last)*c
loss = down * 3 + s[i,... | import sys
input = sys.stdin.buffer.readline
import numpy as np
D = int(input())
c = np.array(input().split(), dtype=np.int32)
s = np.array([input().split() for _ in range(D)], dtype=np.int32)
last = np.zeros(26, dtype=np.int32)
ans = []
point = 0
for i in range(D):
down = (i+1-last)*c
loss = down * 3 + s[i,... | [
"call.remove"
] | 334,691 | 334,692 | u723304131 | python |
p02618 | D = int(input())
C = list(map(int, input().split()))
S = [list(map(int, input().split())) for _ in range(D)]
L = [0]*26
v = 0
ans = [0]*D
import copy
for i in range(1, D+1):
max_score = -float('inf')
max_idx = 0
for j in range(26):
temp = v
temp += S[i-1][j]
L_ = copy.copy(L)
... | D = int(input())
C = list(map(int, input().split()))
S = [list(map(int, input().split())) for _ in range(D)]
L = [0]*26
v = 0
ans = [0]*D
import copy
for i in range(1, D+1):
max_score = -float('inf')
max_idx = 0
for j in range(26):
temp = v
temp += S[i-1][j]
L_ = copy.copy(L)
... | [
"call.remove"
] | 334,709 | 334,710 | u186838327 | python |
p02618 | from random import randint
import sys
input = sys.stdin.readline
def calc_score(D, C, S, T):
"""
開催日程Tを受け取ってそこまでのスコアを返す
"""
contest_last_opened = [0]*26 # コンテストiを前回開催した日
score = 0
for d, t in enumerate(T, start=1):
get_score = S[d-1][t-1]
score += get_score
contest_las... | from random import randint
import sys
input = sys.stdin.readline
def calc_score(D, C, S, T):
"""
開催日程Tを受け取ってそこまでのスコアを返す
"""
contest_last_opened = [0]*26 # コンテストiを前回開催した日
score = 0
for d, t in enumerate(T, start=1):
get_score = S[d-1][t-1]
score += get_score
contest_las... | [
"literal.number.integer.change",
"assignment.value.change"
] | 334,737 | 334,738 | u312025627 | python |
p02618 | import sys
import numpy as np
from operator import mul
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
d = int(readline())
c = list(map(int, readline().split()))
s = []
for _ in range(d):
add = list(map(int, readline().split()))
s.append(add)
#t = [0] *... | import sys
import numpy as np
from operator import mul
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
d = int(readline())
c = list(map(int, readline().split()))
s = []
for _ in range(d):
add = list(map(int, readline().split()))
s.append(add)
#t = [0] *... | [
"assignment.value.change",
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 334,781 | 334,782 | u312078744 | python |
p02618 | def scoring(d, t):
arr = [l for l in last]
arr[t] = d
return S[d][t] - sum((d - l) * c for l, c in zip(arr, C))
D = int(input())
C = list(map(int, input().split()))
S = []
for _ in range(D):
s = list(map(int, input().split()))
S.append(s)
last = [-1] * 26
ans = []
for i in range(D):
res = -10 *... | def scoring(d, t):
arr = [l for l in last]
arr[t] = d
return S[d][t] - sum((d - l) * c for l, c in zip(arr, C))
D = int(input())
C = list(map(int, input().split()))
S = []
for _ in range(D):
s = list(map(int, input().split()))
S.append(s)
last = [-1] * 26
ans = []
for i in range(D):
res = -10 *... | [
"expression.operation.binary.add"
] | 334,795 | 334,796 | u450956662 | python |
p02618 | # annealing is all you need
# hyper parameter tune is all you need
from time import time
t0 = time()
import sys
sys.setrecursionlimit(1 << 25)
read = sys.stdin.readline
ra = range
enu = enumerate
def exit(*argv, **kwarg):
print(*argv, **kwarg)
sys.exit()
def mina(*argv, sub=1): return list(map(lambda x: x... | # annealing is all you need
# hyper parameter tune is all you need
from time import time
t0 = time()
import sys
sys.setrecursionlimit(1 << 25)
read = sys.stdin.readline
ra = range
enu = enumerate
def exit(*argv, **kwarg):
print(*argv, **kwarg)
sys.exit()
def mina(*argv, sub=1): return list(map(lambda x: x... | [
"assignment.value.change",
"literal.number.float.change",
"literal.number.integer.change",
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change"
] | 334,805 | 334,804 | u179169725 | python |
p02618 | import random
d = int(input())
dd = d * (d + 1) // 2
*C, = map(int, input().split())
S = [list(map(int, input().split())) for i in range(d)]
T = [random.choice(range(26)) for i in range(d)]
score = 0
for _ in range(10**5):
p = random.choice(range(d))
q = random.choice(range(26))
memo = T[p]
T[p] = q
... | import random
d = int(input())
dd = d * (d + 1) // 2
*C, = map(int, input().split())
S = [list(map(int, input().split())) for i in range(d)]
T = [random.choice(range(26)) for i in range(d)]
score = 0
for _ in range(10**5):
p = random.choice(range(d))
q = random.choice(range(26))
memo = T[p]
T[p] = q
... | [
"expression.operation.binary.add"
] | 334,897 | 334,898 | u997641430 | python |
p02618 | from math import inf
from random import randint,random
import time
START=time.time()
PROB=0.99
def f(a,d,T):
try:
return T[d:].index(a)+d
except ValueError:
return len(T)
from random import randint
A=26
D=int(input())
C=[0]+list(map(int,input().split())) #減る満足度のベース
S=[0]*(D+1) #S[d][i] :(d+1... | from math import inf
from random import randint,random
import time
START=time.time()
PROB=0.9999
def f(a,d,T):
try:
return T[d:].index(a)+d
except ValueError:
return len(T)
from random import randint
A=26
D=int(input())
C=[0]+list(map(int,input().split())) #減る満足度のベース
S=[0]*(D+1) #S[d][i] :(d... | [
"literal.number.float.change",
"assignment.value.change",
"misc.opposites",
"expression.operator.arithmetic.change",
"function.return_value.change",
"expression.operation.binary.change",
"control_flow.loop.condition.change"
] | 335,006 | 335,007 | u779805689 | python |
p02618 | import sys
import math
from collections import deque
sys.setrecursionlimit(1000000)
MOD = 10 ** 9 + 7
input = lambda: sys.stdin.readline().strip()
NI = lambda: int(input())
NMI = lambda: map(int, input().split())
NLI = lambda: list(NMI())
SI = lambda: input()
def make_grid(h, w, num): return [[int(num)] * w for _ in... | import sys
import math
from collections import deque
sys.setrecursionlimit(1000000)
MOD = 10 ** 9 + 7
input = lambda: sys.stdin.readline().strip()
NI = lambda: int(input())
NMI = lambda: map(int, input().split())
NLI = lambda: list(NMI())
SI = lambda: input()
def make_grid(h, w, num): return [[int(num)] * w for _ in... | [
"call.arguments.change",
"io.output.change"
] | 335,109 | 335,108 | u607075479 | python |
p02618 | # coding: utf-8
# Your code here!
import numpy as np
d= int(input())
C = list(map(int,input().split()))
CB = [0 for i in range(len(C))]
c = sum(C)
total = 0
#print(c,C,CB)
L = []
for i in range(d):
L.append(list(map(int,input().split())))
#print(L)
#print(T)
def cnt(CB,t):
for i in range(len(CB)):
... | # coding: utf-8
# Your code here!
import numpy as np
d= int(input())
C = list(map(int,input().split()))
CB = [0 for i in range(len(C))]
c = sum(C)
total = 0
#print(c,C,CB)
L = []
for i in range(d):
L.append(list(map(int,input().split())))
#print(L)
#print(T)
def cnt(CB,t):
for i in range(len(CB)):
... | [
"call.arguments.change",
"io.output.change"
] | 335,146 | 335,147 | u880850253 | python |
p02618 | def get_score(day, contest, prev_list, loss_list, satisfied_matrix):
plus = satisfied_matrix[day][contest]
minus = 0
for type, prev in enumerate(prev_list):
if type == contest:
continue
spend = day - prev
minus += loss_list[type] * spend
return plus - minus
days =... |
def get_score(day, contest, prev_list, loss_list, satisfied_matrix):
plus = satisfied_matrix[day][contest]
minus = 0
for type, prev in enumerate(prev_list):
if type == contest:
continue
spend = day - prev
minus += loss_list[type] * spend
return plus - minus
days ... | [
"expression.operation.binary.add"
] | 335,148 | 335,149 | u380524497 | python |
p02618 | def calc_score(sch):
d=[0]*26
score=0
for i in range(dur):
j=sch[i]-1
s=S[i]
score+=s[j]+c[j]*(i+1-d[j])+sum([-c[k]*(i+1-d[k]) for k in range(26)])
d[j]=i+1
return score
def greedy(dur,c,S,r):
sch=[]
d=[0]*26
for i in range(dur):
t=0
s=S[i]
... | def calc_score(sch):
d=[0]*26
score=0
for i in range(dur):
j=sch[i]-1
s=S[i]
score+=s[j]+c[j]*(i+1-d[j])+sum([-c[k]*(i+1-d[k]) for k in range(26)])
d[j]=i+1
return score
def greedy(dur,c,S,r):
sch=[]
d=[0]*26
for i in range(dur):
t=0
s=S[i]
... | [
"call.add",
"call.arguments.add"
] | 335,277 | 335,278 | u623819879 | python |
p02624 | N = int(input())
ans = 0
for i in range(N):
j = N // i
ans += i * j * (j+1) / 2
print(ans)
| N = int(input())
ans = 0
for i in range(1, N+1):
j = N // i
ans += i * j * (j+1) // 2
print(ans)
| [
"call.arguments.add",
"expression.operator.arithmetic.change",
"expression.operation.binary.change"
] | 335,392 | 335,391 | u837340160 | python |
p02624 | import sympy
n = int(input())
ans, count = 0, 0
for j in range(1, n+1):
a = n//j
ans += a*(a+1)*j//2
print(ans)
| n = int(input())
ans = 0
for j in range(1, n+1):
a = n//j
ans += a*(a+1)*j//2
print(ans)
| [] | 335,421 | 335,422 | u289288647 | python |
p02624 | n = int(input())
def calc_sum(b, e):
cnt = (e - b) // b
return (b + e) * cnt // 2
ans = 0
for i in range(1, n+1):
ans += calc_sum(i, n // i * i)
print(ans) | n = int(input())
def calc_sum(b, e):
cnt = (e - b) // b + 1
return (b + e) * cnt // 2
ans = 0
for i in range(1, n+1):
ans += calc_sum(i, n // i * i)
print(ans) | [
"assignment.change"
] | 335,423 | 335,424 | u158995862 | python |
p02624 | n = int(input())
def calc_sum(b, e):
cnt = (e - b) // b
return (b + e) * cnt // 2
ans = 0
for i in range(n+1):
ans += calc_sum(i, n // i * i)
print(ans) | n = int(input())
def calc_sum(b, e):
cnt = (e - b) // b + 1
return (b + e) * cnt // 2
ans = 0
for i in range(1, n+1):
ans += calc_sum(i, n // i * i)
print(ans) | [
"call.arguments.add"
] | 335,425 | 335,424 | u158995862 | python |
p02624 | N = int(input())
ans = 0
for i in range(1, N+1):
Y = N // j
ans += Y * (Y+1) * j / 2
print(int(ans)) | N = int(input())
ans = 0
for i in range(1, N+1):
Y = N // i
ans += Y * (Y+1) * i / 2
print(int(ans))
| [
"assignment.value.change",
"identifier.change",
"expression.operation.binary.change"
] | 335,430 | 335,431 | u661649266 | python |
p02624 | n = int(input())
ans = 0
for x in range(1, n+1):
k = n//x
ans += n*(2*x + (n-1)*x)//2
print(ans) | n = int(input())
ans = 0
for x in range(1, n+1):
k = n//x
ans += k*(2*x + (k-1)*x)//2
print(ans)
| [
"identifier.change",
"expression.operation.binary.change"
] | 335,439 | 335,440 | u228303592 | python |
p02624 | import sys
read = sys.stdin.read
def main():
n = int(input())
if n == 1:
print(1)
sys.exit()
# nd:num of div
r = 0
for i1 in range(1, n):
y = n // i1
r += y * (y + 1) * i1 / 2
print(int(r))
if __name__ == '__main__':
main() | import sys
read = sys.stdin.read
def main():
n = int(input())
if n == 1:
print(1)
sys.exit()
# nd:num of div
r = 0
for i1 in range(1, n + 1):
y = n // i1
r += y * (y + 1) * i1 / 2
print(int(r))
if __name__ == '__main__':
main() | [
"control_flow.loop.range.bounds.upper.change",
"expression.operation.binary.add"
] | 335,472 | 335,473 | u072717685 | python |
p02624 | N= int(input())
ans = 0
for j in range(N):
N_j = N//j
ans += j*(1+N_j)*N_j//2
print(ans) | N= int(input())
ans = 0
for j in range(1,N+1):
N_j = N//j
ans += j*(1+N_j)*N_j//2
print(ans) | [
"call.arguments.add"
] | 335,494 | 335,495 | u667084803 | python |
p02624 | import sys
input = sys.stdin.readline
#n = int(input())
#l = list(map(int, input().split()))
'''
a=[]
b=[]
for i in range():
A, B = map(int, input().split())
a.append(A)
b.append(B)'''
n=10000000
ans=0
for i in range(1,n+1):
ans+=i*(n//i)*(1+n//i)//2
print(ans) | import sys
input = sys.stdin.readline
#n = int(input())
#l = list(map(int, input().split()))
'''
a=[]
b=[]
for i in range():
A, B = map(int, input().split())
a.append(A)
b.append(B)'''
n=int(input())
ans=0
for i in range(1,n+1):
ans+=i*(n//i)*(1+n//i)//2
print(ans) | [
"assignment.value.change",
"identifier.replace.add",
"literal.replace.remove",
"call.arguments.add"
] | 335,499 | 335,500 | u372102441 | python |
p02623 | import bisect
N, M, K = map(int, input().split())
Alist = [0] + list(map(int, input().split()))
Blist = list(map(int, input().split()))
B = [Blist[0]]
for b in Blist[1:]:
B.append(b + B[-1])
sums = 0
ans = 0
for idx, a in enumerate(Alist):
sums += a
if sums > K:
break
k = K - sums
print(... | import bisect
N, M, K = map(int, input().split())
Alist = [0] + list(map(int, input().split()))
Blist = list(map(int, input().split()))
B = [Blist[0]]
for b in Blist[1:]:
B.append(b + B[-1])
sums = 0
ans = 0
for idx, a in enumerate(Alist):
sums += a
if sums > K:
break
k = K - sums
tmp = ... | [
"call.remove"
] | 335,534 | 335,535 | u000623733 | python |
p02623 | import bisect
N, M, K = map(int, input().split())
Alist = [0] + list(map(int, input().split()))
Blist = list(map(int, input().split()))
B = [Blist[0]]
for b in Blist[1:]:
B.append(b + B[-1])
print(B)
sums = 0
ans = 0
for idx, a in enumerate(Alist):
sums += a
if sums > K:
break
k = K - sums
... | import bisect
N, M, K = map(int, input().split())
Alist = [0] + list(map(int, input().split()))
Blist = list(map(int, input().split()))
B = [Blist[0]]
for b in Blist[1:]:
B.append(b + B[-1])
sums = 0
ans = 0
for idx, a in enumerate(Alist):
sums += a
if sums > K:
break
k = K - sums
tmp = ... | [
"call.remove"
] | 335,536 | 335,535 | u000623733 | python |
p02623 | import bisect
N, M, K = map(int, input().split())
Alist = [0] + list(map(int, input().split()))
Blist = list(map(int, input().split()))
B = [Blist[0]]
for b in Blist[1:]:
B.append(b + Blist[-1])
sums = 0
ans = 0
for idx, a in enumerate(Alist):
sums += a
if sums > K:
break
k = K - sums
tmp... | import bisect
N, M, K = map(int, input().split())
Alist = [0] + list(map(int, input().split()))
Blist = list(map(int, input().split()))
B = [Blist[0]]
for b in Blist[1:]:
B.append(b + B[-1])
sums = 0
ans = 0
for idx, a in enumerate(Alist):
sums += a
if sums > K:
break
k = K - sums
tmp = ... | [
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 335,537 | 335,535 | u000623733 | python |
p02623 | import bisect
N, M, K = map(int, input().split())
Alist = [0] + list(map(int, input().split()))
Blist = list(map(int, input().split()))
B = [Blist[0]]
for b in Blist[1:]:
B.append(b + Blist[-1])
sums = 0
ans = 0
for idx, a in enumerate(Alist):
sums += a
if sums > K:
break
k = K - sums
tmp... | import bisect
N, M, K = map(int, input().split())
Alist = [0] + list(map(int, input().split()))
Blist = list(map(int, input().split()))
B = [Blist[0]]
for b in Blist[1:]:
B.append(b + B[-1])
sums = 0
ans = 0
for idx, a in enumerate(Alist):
sums += a
if sums > K:
break
k = K - sums
tmp = ... | [
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change",
"assignment.value.change"
] | 335,538 | 335,535 | u000623733 | python |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.