Datasets:

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
import sys sys.setrecursionlimit(10 ** 9) # input = sys.stdin.readline #### def int1(x): return int(x) - 1 def II(): return int(input()) def MI(): return map(int, input().split()) def MI1(): return map(int1, input().split()) def LI(): return list(map(int, input().split())) def LI1(): return list(map(int1, input().sp...
import sys sys.setrecursionlimit(10 ** 9) # input = sys.stdin.readline #### def int1(x): return int(x) - 1 def II(): return int(input()) def MI(): return map(int, input().split()) def MI1(): return map(int1, input().split()) def LI(): return list(map(int, input().split())) def LI1(): return list(map(int1, input().sp...
[ "call.add", "call.arguments.change" ]
332,169
332,170
u564589929
python
p02623
n,m,k=map(int,input().split()) A=list(map(int,input().split())) B=list(map(int,input().split())) a=[0];b=[0];ans=0;j=m for i in range(n): a.append(a[i]+A[i]) for i in range(m): b.append(b[i]+B[i]) for i in range(n+1): if a[i]>k: break while b[j]<k-a[i]: j-=1 ans=max(ans,i+j) print(ans)
n,m,k=map(int,input().split()) A=list(map(int,input().split())) B=list(map(int,input().split())) a=[0];b=[0];ans=0;j=m for i in range(n): a.append(a[i]+A[i]) for i in range(m): b.append(b[i]+B[i]) for i in range(n+1): if a[i]>k: break while b[j]>k-a[i]: j-=1 ans=max(ans,i+j) print(an...
[ "misc.opposites", "expression.operator.compare.change", "control_flow.loop.condition.change" ]
332,186
332,187
u500673386
python
p02623
n, m, x = map(int, input().split(' ')) a = list(map(int, input().split(' '))) b = list(map(int, input().split(' '))) A = [0] B = [0] for i in range(len(a)): A.append(A[-1] + a[i]) for i in range(len(b)): B.append(B[-1] + b[i]) y = len(B) - 1 ans = 0 for i in range(len(A)): while A[i] + B[y] > x: y -= 1 if y ==...
n, m, x = map(int, input().split(' ')) a = list(map(int, input().split(' '))) b = list(map(int, input().split(' '))) A = [0] B = [0] for i in range(len(a)): A.append(A[-1] + a[i]) for i in range(len(b)): B.append(B[-1] + b[i]) y = len(B) - 1 ans = 0 for i in range(len(A)): while A[i] + B[y] > x: y -= 1 if y ==...
[ "identifier.change", "control_flow.branch.if.condition.change" ]
332,193
332,194
u467479913
python
p02623
from collections import deque import numpy as np n,m,k = map(int,input().split()) A = deque(map(int,input().split())) B = deque(map(int,input().split())) a=[0] b = [0] for i in range(n): a.append(a[i-1]+A[i]) for i in range(m): b.append(b[i-1]+B[i]) x,j = 0,m for i in range(n+1): if a[i]>k: break ...
from collections import deque import numpy as np n,m,k = map(int,input().split()) A = deque(map(int,input().split())) B = deque(map(int,input().split())) 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]) x,j = 0,m for i in range(n+1): if a[i]>k: break ...
[ "expression.operation.binary.remove" ]
332,250
332,251
u709970295
python
p02623
import sys def input(): return sys.stdin.readline().strip() def mapint(): return map(int, input().split()) sys.setrecursionlimit(10**9) from itertools import accumulate N, M, K = mapint() As = list(accumulate(list(mapint()))) Bs = list(accumulate(list(mapint()))) from bisect import bisect_right ans = 0 for i, a in en...
import sys def input(): return sys.stdin.readline().strip() def mapint(): return map(int, input().split()) sys.setrecursionlimit(10**9) from itertools import accumulate N, M, K = mapint() As = [0]+list(accumulate(list(mapint()))) Bs = list(accumulate(list(mapint()))) from bisect import bisect_right ans = 0 for i, a i...
[ "call.arguments.change" ]
332,269
332,270
u054514819
python
p02623
# -*- coding: utf-8 -*- a = list(map(int, input().split())) A = list(map(int, input().split())) B = list(map(int, input().split())) N = a[0] M = a[1] K = a[2] count = 0 #読んだ冊数を記録 count_time = 0 #読んだ時間を記録 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]) ans, j = 0...
# -*- coding: utf-8 -*- a = list(map(int, input().split())) A = list(map(int, input().split())) B = list(map(int, input().split())) N = a[0] M = a[1] K = a[2] count = 0 #読んだ冊数を記録 count_time = 0 #読んだ時間を記録 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]) ans, j = 0...
[ "misc.opposites", "expression.operator.compare.change", "control_flow.loop.condition.change" ]
332,277
332,278
u219226973
python
p02623
n,m,k = map(int,input().split()) a = list(map(int,input().split())) b = list(map(int,input().split())) c = [0] d = 0 for i in range(n): d += a[i] c.append(d) e = [0] f = 0 for i in range(m): f += b[i] e.append(f) ans = 0 j = m for i in range(n): if c[i] > k: break else: wh...
n,m,k = map(int,input().split()) a = list(map(int,input().split())) b = list(map(int,input().split())) c = [0] d = 0 for i in range(n): d += a[i] c.append(d) e = [0] f = 0 for i in range(m): f += b[i] e.append(f) ans = 0 j = m for i in range(n+1): if c[i] > k: break else: ...
[ "control_flow.loop.range.bounds.upper.change", "expression.operation.binary.add" ]
332,288
332,289
u865119809
python
p02623
#c n,m,k = map(int,input().split()) a = list(map(int,input().split())) b = list(map(int,input().split())) c = [0] d = 0 for i in range(n): d += a[i] c.append(d) e = [0] f = 0 for i in range(m): f += b[i] e.append(f) ans = 0 j = q-1 for i in range(n): if c[i] > k: break else: ...
n,m,k = map(int,input().split()) a = list(map(int,input().split())) b = list(map(int,input().split())) c = [0] d = 0 for i in range(n): d += a[i] c.append(d) e = [0] f = 0 for i in range(m): f += b[i] e.append(f) ans = 0 j = m for i in range(n+1): if c[i] > k: break else: ...
[ "assignment.value.change", "expression.operation.binary.change", "expression.operation.binary.remove" ]
332,290
332,289
u865119809
python
p02623
n,m,k = map(int,input().split()) a = list(map(int,input().split())) b = list(map(int,input().split())) c = [0] d = 0 for i in range(n): d += a[i] c.append(d) e = [0] f = 0 for i in range(n): f += b[i] e.append(f) ans = 0 j = q-1 for i in range(n): if c[i] > k: break else: w...
n,m,k = map(int,input().split()) a = list(map(int,input().split())) b = list(map(int,input().split())) c = [0] d = 0 for i in range(n): d += a[i] c.append(d) e = [0] f = 0 for i in range(m): f += b[i] e.append(f) ans = 0 j = m for i in range(n+1): if c[i] > k: break else: ...
[ "identifier.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change", "assignment.value.change", "expression.operation.binary.change", "expression.operation.binary.remove" ]
332,291
332,289
u865119809
python
p02623
import sys #DEBUG = True DEBUG = False if DEBUG: f=open("202006_5th/C_input.txt") else: f=sys.stdin #---- M,N,K=map(int,f.readline().split()) ans=0 __=N M_shelf=list(map(int,f.readline().split())) N_shelf=list(map(int,f.readline().split())) M_partial=[] N_partial=[] M_partial.append(0) N_partial.append(0) #----...
import sys #DEBUG = True DEBUG = False if DEBUG: f=open("202006_5th/C_input.txt") else: f=sys.stdin #---- M,N,K=map(int,f.readline().split()) ans=0 __=N M_shelf=list(map(int,f.readline().split())) N_shelf=list(map(int,f.readline().split())) M_partial=[] N_partial=[] M_partial.append(0) N_partial.append(0) #----...
[ "call.arguments.change" ]
332,318
332,319
u284679563
python
p02623
import sys #DEBUG = True DEBUG = False if DEBUG: f=open("202006_5th/C_input.txt") else: f=sys.stdin #---- M,N,K=map(int,f.readline().split()) ans=0 __=N M_shelf=list(map(int,f.readline().split())) N_shelf=list(map(int,f.readline().split())) M_partial=[] N_partial=[] M_partial.append(0) N_partial.append(0) #----...
import sys #DEBUG = True DEBUG = False if DEBUG: f=open("202006_5th/C_input.txt") else: f=sys.stdin #---- M,N,K=map(int,f.readline().split()) ans=0 __=N M_shelf=list(map(int,f.readline().split())) N_shelf=list(map(int,f.readline().split())) M_partial=[] N_partial=[] M_partial.append(0) N_partial.append(0) #----...
[ "call.arguments.change", "control_flow.continue.remove", "control_flow.break.add" ]
332,320
332,319
u284679563
python
p02623
from itertools import accumulate import bisect n, m, k = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, input().split())) x = 0 a1 = [0] + list(accumulate(a)) b1 = list(accumulate(b)) for i in range(1, n + 1): ren = k - a1[i] if ren < 0: break j = bisect.bisect_right(b1, ren...
from itertools import accumulate import bisect n, m, k = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, input().split())) x = 0 a1 = [0] + list(accumulate(a)) b1 = list(accumulate(b)) for i in range(n + 1): ren = k - a1[i] if ren < 0: break j = bisect.bisect_right(b1, ren) ...
[ "call.arguments.change" ]
332,339
332,340
u110291662
python
p02623
import bisect 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] honn=bisect.bisect(B,K) print(honn) for i in range(len(A)): s=K-A[i] if s>=0: a=bisect.bi...
import bisect 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] honn=a=bisect.bisect(B,K) for i in range(len(A)): s=K-A[i] if s>=0: a=bisect.bisect(B,s) if...
[ "call.remove" ]
332,367
332,368
u591143370
python
p02623
import bisect 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] honn=bisect.bisect(B,K) print(honn) for i in range(len(A)): s=K-A[i] if s>=0: a=bisect.bi...
import bisect 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] honn=bisect.bisect(B,K) #print(honn) for i in range(len(A)): s=K-A[i] if s>=0: a=bisect.b...
[ "call.remove" ]
332,367
332,369
u591143370
python
p02623
n_book_a, n_book_b, limit_time = map(int, input().split(" ")) read_time_a = [int(i) for i in input().split(" ")] read_time_b = [int(i) for i in input().split(" ")] read_sum_time_a = [0] # 1冊も読まないパターン for i in range(n_book_a): read_sum_time_a.append(read_sum_time_a[i] + read_time_a[i]) read_sum_time_b = [0] ...
n_book_a, n_book_b, limit_time = map(int, input().split(" ")) read_time_a = [int(i) for i in input().split(" ")] read_time_b = [int(i) for i in input().split(" ")] read_sum_time_a = [0] # 1冊も読まないパターン for i in range(n_book_a): read_sum_time_a.append(read_sum_time_a[i] + read_time_a[i]) read_sum_time_b = [0] ...
[]
332,370
332,371
u945405878
python
p02623
n,m,k=map(int,input().split(" ")) a=[-9] b=list(a) a.extend(map(int,input().split(" "))) b.extend(map(int,input().split(" "))) t=0 i=1 while i<=n : # print("a[{}]={}".format(i,a[i])) if t+a[i]>k : break t+=a[i] # print("t=",t) i+=1 i-=1 # print("i=",i) j=1 while j<=m : if t+b[j]>k : ...
n,m,k=map(int,input().split(" ")) a=[-9] b=list(a) a.extend(map(int,input().split(" "))) b.extend(map(int,input().split(" "))) t=0 i=1 while i<=n : # print("a[{}]={}".format(i,a[i])) if t+a[i]>k : break t+=a[i] # print("t=",t) i+=1 i-=1 # print("i=",i) j=1 while j<=m : if t+b[j]>k : ...
[ "literal.number.integer.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change" ]
332,379
332,380
u745685739
python
p02623
N, M, K = input().split() A = input().split() B = input().split() ta = 0 cnta = 0 while cnta < int(N) and ta + int(A[cnta]) <= int(K): ta += int(A[cnta]) cnta+=1 tb = 0 cntb = 0 while cntb < int(M) and ta + tb + int(B[cntb]) <= int(K): tb += int(B[cntb]) cntb += 1 ans = cnta + cntb while cnta >= ...
N, M, K = input().split() A = input().split() B = input().split() ta = 0 cnta = 0 while cnta < int(N) and ta + int(A[cnta]) <= int(K): ta += int(A[cnta]) cnta+=1 tb = 0 cntb = 0 while cntb < int(M) and ta + tb + int(B[cntb]) <= int(K): tb += int(B[cntb]) cntb += 1 ans = cnta + cntb while cnta - 1...
[ "control_flow.loop.condition.change" ]
332,381
332,382
u631025015
python
p02623
n,m,k=input().split() a=input().split() b=input().split() ta=0 cnta=0 while int(cnta)<int(n) and ta+int(a[cnta])<=int(k) : ta= ta+ int(a[cnta]) cnta=cnta+1 tb=0 cntb=0 while cntb<int(m) and ta+tb+int(b[cntb])<=int(k): tb = tb+ int(b[cntb]) cntb=cntb+1 ans=cnta+cntb while cnta<=0: ta=ta-int(a[cnta]...
n,m,k=input().split() a=input().split() b=input().split() ta=0 cnta=0 while int(cnta)<int(n) and ta+int(a[cnta])<=int(k) : ta= ta+ int(a[cnta]) cnta=cnta+1 tb=0 cntb=0 while cntb<int(m) and ta+tb+int(b[cntb])<=int(k): tb = tb+ int(b[cntb]) cntb=cntb+1 ans=cnta+cntb while cnta-1>=0: ta=ta-int(a[cnt...
[ "control_flow.loop.condition.change" ]
332,383
332,384
u381567850
python
p02623
import bisect def main(): N, M, K = map(int, input().split()) A = [int(v) for v in input().split()] B = [int(v) for v in input().split()] ruisekiA = [0 for _ in range(N+1)] ruisekiB = [0 for _ in range(M+1)] for i in range(N): ruisekiA[i + 1] = ruisekiA[i] + A[i] for i in range(M):...
import bisect def main(): N, M, K = map(int, input().split()) A = [int(v) for v in input().split()] B = [int(v) for v in input().split()] ruisekiA = [0 for _ in range(N+1)] ruisekiB = [0 for _ in range(M+1)] for i in range(N): ruisekiA[i + 1] = ruisekiA[i] + A[i] for i in range(M):...
[ "identifier.replace.remove", "literal.replace.add", "control_flow.branch.if.condition.change", "control_flow.continue.remove", "control_flow.break.add" ]
332,392
332,393
u926080943
python
p02623
from itertools import zip_longest, count, accumulate from bisect import bisect, bisect_left def LIST(): return list(map(int, input().split())) n, m, k = map(int, input().split()) a = [0] + list(accumulate(LIST())) b = list(accumulate(LIST())) num = 0 for i, a in enumerate(a): time_rest = k - a if time_...
from itertools import zip_longest, count, accumulate from bisect import bisect, bisect_left def LIST(): return list(map(int, input().split())) n, m, k = map(int, input().split()) a = [0] + list(accumulate(LIST())) b = list(accumulate(LIST())) num = 0 for i, a in enumerate(a): time_rest = k - a if t...
[ "assignment.value.change", "identifier.change", "call.function.change", "call.arguments.change", "expression.operation.binary.change" ]
332,400
332,401
u952968889
python
p02623
#!/usr/bin/env python import os import operator from collections import defaultdict import sys from io import BytesIO, IOBase import bisect # def power(x, p): # res = 1 # while p: # if p & 1: # res = res * x % 1000000007 # x = x * x % 1000000007 # p >>= 1 # return res; ...
#!/usr/bin/env python import os import operator from collections import defaultdict import sys from io import BytesIO, IOBase import bisect # def power(x, p): # res = 1 # while p: # if p & 1: # res = res * x % 1000000007 # x = x * x % 1000000007 # p >>= 1 # return res; ...
[ "call.remove" ]
332,518
332,519
u970369332
python
p02623
import bisect N,M,K=map(int,inp().split()) list_a=list(map(int,inp().split())) list_b=list(map(int,inp().split())) totaltame_a=[0] for a in list_a: temp_a=totaltame_a[-1]+a if temp_a>K: break else: totaltame_a.append(temp_a) totaltime_b=[0] for b in list_b: totaltime_b.append(totalt...
import bisect N,M,K=map(int,input().split()) list_a=list(map(int,input().split())) list_b=list(map(int,input().split())) totaltame_a=[0] for a in list_a: temp_a=totaltame_a[-1]+a if temp_a>K: break else: totaltame_a.append(temp_a) totaltime_b=[0] for b in list_b: totaltime_b.append(...
[ "assignment.value.change", "identifier.change", "call.function.change", "call.arguments.change" ]
332,570
332,571
u674588203
python
p02623
# abc172_c.py ''' 尺取り法、二分探索、両方良問なので両方で解けるようにする。 ''' N, M ,K= map(int,input().split()) A = list(map(int,input().split())) B = list(map(int,input().split())) ans = 0 cnt = [] b_idx = M-1 # A を1冊ずつ増やす→B の読める場所を後ろにずらしていくイメージで実装する # 両方累積和で管理して、計算を減らす(Bは特に後ろにずらすと再計算が必要) b_cum = [] cum = 0 for b in B: cum += b b_cum....
# abc172_c.py ''' 尺取り法、二分探索、両方良問なので両方で解けるようにする。 ''' N, M ,K= map(int,input().split()) A = [0] + list(map(int,input().split())) B = list(map(int,input().split())) ans = 0 cnt = [] b_idx = M-1 # A を1冊ずつ増やす→B の読める場所を後ろにずらしていくイメージで実装する # 両方累積和で管理して、計算を減らす(Bは特に後ろにずらすと再計算が必要) b_cum = [] cum = 0 for b in B: cum += b ...
[ "literal.number.integer.change", "assignment.value.change", "call.arguments.change", "expression.operation.binary.change" ]
332,577
332,578
u371132735
python
p02623
import bisect n,m,k = map(int, input().split()) A = list(map(int, input().split())) B = list(map(int, input().split())) A_cum = [0] B_cum = [0] for i in range(n): A_cum.append(A_cum[i]+A[i]) for i in range(m): B_cum.append(B_cum[i]+B[i]) ans = 0 for i in range(n+1): rest = k-A_cum[i] if rest<=0: ...
import bisect n,m,k = map(int, input().split()) A = list(map(int, input().split())) B = list(map(int, input().split())) A_cum = [0] B_cum = [0] for i in range(n): A_cum.append(A_cum[i]+A[i]) for i in range(m): B_cum.append(B_cum[i]+B[i]) ans = 0 for i in range(n+1): rest = k-A_cum[i] if rest<0: con...
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change", "assignment.value.change", "identifier.change", "call.arguments.change", "expression.operation.binary.change" ]
332,590
332,588
u089376182
python
p02623
import bisect n,m,k = map(int, input().split()) A = list(map(int, input().split())) B = list(map(int, input().split())) A_cum = [0] B_cum = [0] for i in range(n): A_cum.append(A_cum[i]+A[i]) for i in range(m): B_cum.append(B_cum[i]+B[i]) ans = 0 for i in range(n): rest = k-A_cum[i] if rest<=0: ...
import bisect n,m,k = map(int, input().split()) A = list(map(int, input().split())) B = list(map(int, input().split())) A_cum = [0] B_cum = [0] for i in range(n): A_cum.append(A_cum[i]+A[i]) for i in range(m): B_cum.append(B_cum[i]+B[i]) ans = 0 for i in range(n+1): rest = k-A_cum[i] if rest<0: con...
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change", "assignment.value.change", "identifier.change", "call.arguments.change", "expression.operation.binary.change" ]
332,591
332,588
u089376182
python
p02623
import bisect n,m,k = map(int,input().split()) a = [0]+list(map(int,input().split())) b = list(map(int,input().split())) for i in range(1,n+1): a[i] += a[i-1] for j in range(1,m): b[j] += b[j-1] ans = 0 for i in range(n+1): x = k-a[i] ptr = bisect.bisect_right(b,x) ans = max(ans,ptr+i) print(ans)
import bisect n,m,k = map(int,input().split()) a = [0]+list(map(int,input().split())) b = list(map(int,input().split())) for i in range(1,n+1): a[i] += a[i-1] for j in range(1,m): b[j] += b[j-1] ans = 0 for i in range(n+1): x = k-a[i] if x < 0: break ptr = bisect.bisect_right(b,x) ans = max(ans,ptr+i) p...
[ "control_flow.branch.if.add", "control_flow.break.add" ]
332,594
332,595
u905582793
python
p02623
def INT(): return int(input()) def MI(): return map(int, input().split()) def LI(): return list(map(int, input().split())) N, M, K = MI() A = [0] + LI() B = [0] + LI() for i in range(1, N + 1): A[i] += A[i - 1] for i in range(1, M + 1): B[i] += B[i - 1] if B[i] <= K: ans = i a...
def INT(): return int(input()) def MI(): return map(int, input().split()) def LI(): return list(map(int, input().split())) N, M, K = MI() A = [0] + LI() B = [0] + LI() for i in range(1, N + 1): A[i] += A[i - 1] for i in range(1, M + 1): B[i] += B[i - 1] if B[i] <= K: ans = i a...
[ "call.arguments.change" ]
332,615
332,616
u417096287
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(n): if i == 0: continue else: a[i] += a[i-1] for i in range(m): if i == 0: continue else: b[i] += b[i - 1] a = [0]+a b = [0]+b i = 0 j = m ans = 0 wh...
n,m,k = map(int,input().split()) a = list(map(int,input().split())) b = list(map(int,input().split())) for i in range(n): if i == 0: continue else: a[i] += a[i-1] for i in range(m): if i == 0: continue else: b[i] += b[i - 1] a = [0]+a b = [0]+b i = 0 j = m ans = 0 wh...
[ "assignment.remove" ]
332,623
332,624
u785415976
python
p02623
n,m,k=map(int,input().split()) a=list(map(int,input().split())) b=list(map(int,input().split())) a_pre,b_pre=[0],[0] for i in range(n): a_pre.append(a_pre[i]+a[i]) for i in range(m): b_pre.append(b_pre[i]+b[i]) ans,j=0,m for i in range(n+1): if a_pre[i]>k: break while b[j]>k-a[i]: j-=1 ans=max(ans,i+j) ...
n,m,k=map(int,input().split()) a=list(map(int,input().split())) b=list(map(int,input().split())) a_pre,b_pre=[0],[0] for i in range(n): a_pre.append(a_pre[i]+a[i]) for i in range(m): b_pre.append(b_pre[i]+b[i]) ans,j=0,m for i in range(n+1): if a_pre[i]>k: break while b_pre[j]>k-a_pre[i]: j-=1 ans=max(a...
[ "identifier.change", "control_flow.loop.condition.change" ]
332,672
332,673
u440613652
python
p02623
# coding:utf-8 import itertools n, m, k = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, input().split())) ans = 0 j = m aa = [0] + list(itertools.accumulate(a)) bb = [0] + list(itertools.accumulate(b)) #print(aa) #print(bb) # しゃくとり法 / Aの山だけ読みつつ、そこにBからいくつ取り出すかで考える for i, a_item in en...
# coding:utf-8 import itertools n, m, k = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, input().split())) ans = 0 j = m aa = [0] + list(itertools.accumulate(a)) bb = [0] + list(itertools.accumulate(b)) # print(aa) # print(bb) # しゃくとり法 / Aの山だけ読みつつ、そこにBからいくつ取り出すかで考える for i, a_item in ...
[ "identifier.change", "call.arguments.change", "control_flow.loop.condition.change" ]
332,697
332,698
u167908302
python
p02623
from itertools import accumulate from bisect import * N, M, K = [int(n) for n in input().split()] A = [0]+[x for x in accumulate([int(n) for n in input().split()])] B = [0]+[x for x in accumulate([int(n) for n in input().split()])] ans = 0 a = bisect_left(A, K) for i in range(a): b = bisect_left(B, K-A[i]) ans = m...
from itertools import accumulate from bisect import * N, M, K = [int(n) for n in input().split()] A = [0]+[x for x in accumulate([int(n) for n in input().split()])] B = [0]+[x for x in accumulate([int(n) for n in input().split()])] #print(A) #print(B) ans = 0 a = bisect_right(A, K) #print(a) for i in range(a): b = b...
[ "assignment.value.change", "identifier.change", "call.function.change" ]
332,763
332,764
u842878495
python
p02623
from sys import stdin,stdout import bisect as bs n,m,s=map(int, stdin.readline().split()) dn=list(map(int, stdin.readline().split())) dm=list(map(int, stdin.readline().split())) pre=[dm[0]];s1=0 for v in dm[1:]: pre+=[dm[-1]+v] m=bs.bisect_right(pre,s) for i in range(n): s1+=dn[i] if s-s1>0:m=max(m,i+1+bs.b...
from sys import stdin,stdout import bisect as bs n,m,s=map(int, stdin.readline().split()) dn=list(map(int, stdin.readline().split())) dm=list(map(int, stdin.readline().split())) pre=[dm[0]];s1=0 for v in dm[1:]: pre+=[pre[-1]+v] m=bs.bisect_right(pre,s) for i in range(n): s1+=dn[i] if s-s1>=0:m=max(m,i+1+bs...
[ "identifier.change", "expression.operation.binary.change", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
332,802
332,801
u920463220
python
p02623
from sys import stdin,stdout import bisect as bs n,m,s=map(int, stdin.readline().split()) dn=list(map(int, stdin.readline().split())) dm=list(map(int, stdin.readline().split())) pre=[dm[0]];s1=0 for v in dm[1:]: pre+=[dm[-1]+v] m=bs.bisect(pre,s) for i in range(n): s1+=dn[i] if s-s1>0:m=max(m,i+1+bs.bisect(...
from sys import stdin,stdout import bisect as bs n,m,s=map(int, stdin.readline().split()) dn=list(map(int, stdin.readline().split())) dm=list(map(int, stdin.readline().split())) pre=[dm[0]];s1=0 for v in dm[1:]: pre+=[pre[-1]+v] m=bs.bisect_right(pre,s) for i in range(n): s1+=dn[i] if s-s1>=0:m=max(m,i+1+bs...
[ "identifier.change", "expression.operation.binary.change", "assignment.value.change", "expression.operator.compare.change", "control_flow.branch.if.condition.change", "call.arguments.change" ]
332,803
332,801
u920463220
python
p02623
from sys import stdin,stdout import bisect as bs n,m,s=map(int, stdin.readline().split()) dn=list(map(int, stdin.readline().split())) dm=list(map(int, stdin.readline().split())) pre=[dm[0]];s1=0 for v in dm[1:]: pre+=[dm[-1]+v] m=bs.bisect(pre,s) for i in range(n): s1+=dn[i] if s-s1>=0:m=max(m,i+1+bs.bisect...
from sys import stdin,stdout import bisect as bs n,m,s=map(int, stdin.readline().split()) dn=list(map(int, stdin.readline().split())) dm=list(map(int, stdin.readline().split())) pre=[dm[0]];s1=0 for v in dm[1:]: pre+=[pre[-1]+v] m=bs.bisect_right(pre,s) for i in range(n): s1+=dn[i] if s-s1>=0:m=max(m,i+1+bs...
[ "identifier.change", "expression.operation.binary.change", "assignment.value.change", "call.arguments.change" ]
332,804
332,801
u920463220
python
p02623
N, M, K = map(int, input().split()) A = list(map(int, input().split())) B = list(map(int, input().split())) A_sum = [0] for i in range(N): A_sum.append(A_sum[i] + A[i]) B_sum = [0] for i in range(N): B_sum.append(B_sum[i] + B[i]) B_sum.append(10**10) res = 0 for i in range(len(A_sum)): low = 0 high = ...
N, M, K = map(int, input().split()) A = list(map(int, input().split())) B = list(map(int, input().split())) A_sum = [0] for i in range(N): A_sum.append(A_sum[i] + A[i]) B_sum = [0] for i in range(M): B_sum.append(B_sum[i] + B[i]) B_sum.append(10**10) res = 0 for i in range(len(A_sum)): low = 0 high = ...
[ "identifier.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change" ]
332,841
332,842
u345389118
python
p02623
import bisect N,M,K= map(int, input().split()) A = list(map(int, input().split())) B = list(map(int, input().split())) dpA = [0]*(N+1) dpB = [0]*(M+1) for i in range(1,N+1): dpA[i] = dpA[i-1] + A[i-1] for i in range(1,M+1): dpB[i] = dpB[i-1] + B[i-1] ans = 0 for i in range(1,N+1): if dpA[i] > K: ...
import bisect N,M,K= map(int, input().split()) A = list(map(int, input().split())) B = list(map(int, input().split())) dpA = [0]*(N+1) dpB = [0]*(M+1) for i in range(1,N+1): dpA[i] = dpA[i-1] + A[i-1] for i in range(1,M+1): dpB[i] = dpB[i-1] + B[i-1] ans = 0 for i in range(N+1): if dpA[i] > K: c...
[ "call.arguments.change" ]
332,848
332,849
u695261159
python
p02623
n,m,k = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, input().split())) A = [0] B = [0] for i in range(n): A.append(A[i]+a[i]) for j in range(m): B.append(B[j]+b[j]) #print(A,B) maxij = 0 l = m for i in range(n+1): for j in range(m): # print(i,l,A[i],B[l],k) if(l == 0): bre...
n,m,k = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, input().split())) A = [0] B = [0] for i in range(n): A.append(A[i]+a[i]) for j in range(m): B.append(B[j]+b[j]) #print(A,B) maxij = 0 l = m for i in range(n+1): for j in range(m): # print(i,l,A[i],B[l],k) if(l == -1): br...
[ "control_flow.branch.if.condition.change", "expression.operation.unary.add" ]
332,850
332,851
u969808621
python
p02623
"""everything has a cost!""" from math import * import random, functools, collections, sys __author__ = 'p7x' # sys.stdin = open('in.txt', 'r') # sys.stdout = open('out.txt', 'w') # sys.stderr = open('err.txt', 'w') if __name__ == '__main__': n,m,k = map(int, input().split()) a = list(map(int, input().spl...
"""everything has a cost!""" from math import * import random, functools, collections, sys __author__ = 'p7x' # sys.stdin = open('in.txt', 'r') # sys.stdout = open('out.txt', 'w') # sys.stderr = open('err.txt', 'w') if __name__ == '__main__': n,m,k = map(int, input().split()) a = list(map(int, input().spl...
[ "assignment.value.change", "identifier.change", "call.arguments.change", "expression.operation.binary.change" ]
332,854
332,855
u914273226
python
p02623
from sys import stdin, stdout, setrecursionlimit from collections import deque, defaultdict, Counter import math rl = lambda: stdin.readline() rll = lambda: stdin.readline().split() rli = lambda: map(int, stdin.readline().split()) rlf = lambda: map(float, stdin.readline().split()) INF, NINF = float('inf'), float('-in...
from sys import stdin, stdout, setrecursionlimit from collections import deque, defaultdict, Counter import math rl = lambda: stdin.readline() rll = lambda: stdin.readline().split() rli = lambda: map(int, stdin.readline().split()) rlf = lambda: map(float, stdin.readline().split()) INF, NINF = float('inf'), float('-in...
[ "call.arguments.change", "control_flow.loop.range.bounds.upper.change", "expression.operation.unary.add", "control_flow.loop.range.bounds.step.change" ]
332,875
332,876
u064505481
python
p02623
def bins(a, x): l = -1 h = len(a) while (h-l) > 1: m = (l+h)//2 if x >= a[m]: l = m else: h = m return l n, m, k = list(map(int, input().split())) a = list(map(int, input().split())) b = list(map(int, input().split())) pa, pb = [0] * (n+1), [0] * (m+1) for...
def bins(a, x): l = -1 h = len(a) while (h-l) > 1: m = (l+h)//2 if x >= a[m]: l = m else: h = m return l n, m, k = list(map(int, input().split())) a = list(map(int, input().split())) b = list(map(int, input().split())) pa, pb = [0] * (n+1), [0] * (m+1) for...
[ "expression.operation.binary.remove" ]
332,898
332,899
u829391045
python
p02623
def bins(a, x): l = -1 h = len(a) while (h-l) > 1: m = (l+h)//2 if x >= a[m]: l = m else: h = m return l n, m, k = list(map(int, input().split())) a = list(map(int, input().split())) b = list(map(int, input().split())) pa, pb = [0] * (n+1), [0] * (m+1) for...
def bins(a, x): l = -1 h = len(a) while (h-l) > 1: m = (l+h)//2 if x >= a[m]: l = m else: h = m return l n, m, k = list(map(int, input().split())) a = list(map(int, input().split())) b = list(map(int, input().split())) pa, pb = [0] * (n+1), [0] * (m+1) for...
[]
332,900
332,899
u829391045
python
p02623
def bins(a, x): l = -1 h = len(a) while (h-l) > 1: m = (l+h)//2 if x > a[m]: l = m else: h = m return l + 1 n, m, k = list(map(int, input().split())) a = list(map(int, input().split())) b = list(map(int, input().split())) pa, pb = [0] * (n+1), [0] * (m+1) ...
def bins(a, x): l = -1 h = len(a) while (h-l) > 1: m = (l+h)//2 if x >= a[m]: l = m else: h = m return l n, m, k = list(map(int, input().split())) a = list(map(int, input().split())) b = list(map(int, input().split())) pa, pb = [0] * (n+1), [0] * (m+1) for...
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change", "expression.operation.binary.remove" ]
332,901
332,899
u829391045
python
p02623
n,m,k = map(int,input().split()) a_list = list(map(int,input().split())) b_list = list(map(int,input().split())) from itertools import accumulate import bisect sum_a_list = list(accumulate([0] + a_list)) sum_b_list = list(accumulate([0] + b_list)) ans = 0 b_idx = 0 for a_idx in range(n+1): if sum_a_list[a_idx] >...
n,m,k = map(int,input().split()) a_list = list(map(int,input().split())) b_list = list(map(int,input().split())) from itertools import accumulate import bisect sum_a_list = list(accumulate([0] + a_list)) sum_b_list = list(accumulate([0] + b_list)) ans = 0 b_idx = 0 for a_idx in range(n+1): if sum_a_list[a_idx] >...
[ "assignment.change" ]
332,904
332,905
u024768467
python
p02623
n,m,k = map(int,input().split()) a_list = list(map(int,input().split())) b_list = list(map(int,input().split())) from itertools import accumulate import bisect sum_a_list = list(accumulate([0] + a_list)) sum_b_list = list(accumulate([0] + b_list)) ans = 0 b_idx = 0 for a_idx in range(n+1): if sum_a_list[a_idx] >...
n,m,k = map(int,input().split()) a_list = list(map(int,input().split())) b_list = list(map(int,input().split())) from itertools import accumulate import bisect sum_a_list = list(accumulate([0] + a_list)) sum_b_list = list(accumulate([0] + b_list)) ans = 0 b_idx = 0 for a_idx in range(n+1): if sum_a_list[a_idx] >...
[ "assignment.value.change", "identifier.change" ]
332,906
332,905
u024768467
python
p02623
n,m,k = map(int,input().split()) a_list = list(map(int,input().split())) b_list = list(map(int,input().split())) from itertools import accumulate sum_a_list = list(accumulate([0] + a_list)) sum_b_list = list(accumulate([0] + b_list)) ans = 0 b_idx = 0 for a_idx in range(n+1): if sum_a_list[a_idx] > k: con...
n,m,k = map(int,input().split()) a_list = list(map(int,input().split())) b_list = list(map(int,input().split())) from itertools import accumulate import bisect sum_a_list = list(accumulate([0] + a_list)) sum_b_list = list(accumulate([0] + b_list)) ans = 0 b_idx = 0 for a_idx in range(n+1): if sum_a_list[a_idx] >...
[ "assignment.value.change", "identifier.change" ]
332,907
332,905
u024768467
python
p02623
n,m,k = map(int,input().split()) a_list = list(map(int,input().split())) b_list = list(map(int,input().split())) from itertools import accumulate import bisect sum_a_list = list(accumulate([0] + a_list)) sum_b_list = list(accumulate([0] + b_list)) ans = 0 b_idx = 0 for a_idx in range(n+1): if sum_a_list[a_idx] >...
n,m,k = map(int,input().split()) a_list = list(map(int,input().split())) b_list = list(map(int,input().split())) from itertools import accumulate import bisect sum_a_list = list(accumulate([0] + a_list)) sum_b_list = list(accumulate([0] + b_list)) ans = 0 b_idx = 0 for a_idx in range(n+1): if sum_a_list[a_idx] >...
[ "assignment.value.change", "identifier.change" ]
332,934
332,935
u895408600
python
p02623
n,m,k = map(int,input().split()) A = list(map(int,input().split())) B = list(map(int,input().split())) a = [0]*(n+1) b = [0]*(m+1) for i in range(n): a[i+1] = a[i] + A[i] for i in range(m): b[i+1] = b[i] + B[i] ans = 0 best = m for i in range(n+1): if k < a[i]: break for j in range(best,-1,-1...
n,m,k = map(int,input().split()) A = list(map(int,input().split())) B = list(map(int,input().split())) a = [0]*(n+1) b = [0]*(m+1) for i in range(n): a[i+1] = a[i] + A[i] for i in range(m): b[i+1] = b[i] + B[i] ans = 0 best = m for i in range(n+1): if k < a[i]: break for j in range(best,-1,-1...
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change", "control_flow.break.remove" ]
332,987
332,988
u110859855
python
p02623
n,m,k = map(int,input().split()) A = list(map(int,input().split())) B = list(map(int,input().split())) a = [0]*(n+1) b = [0]*(m+1) for i in range(n): a[i+1] = a[i] + A[i] for i in range(m): b[i+1] = b[i] + B[i] ans = 0 best = m for i in range(n+1): if k < a[i]: break for j in range(best,-1,-1...
n,m,k = map(int,input().split()) A = list(map(int,input().split())) B = list(map(int,input().split())) a = [0]*(n+1) b = [0]*(m+1) for i in range(n): a[i+1] = a[i] + A[i] for i in range(m): b[i+1] = b[i] + B[i] ans = 0 best = m for i in range(n+1): if k < a[i]: break for j in range(best,-1,-1...
[ "control_flow.break.remove" ]
332,989
332,988
u110859855
python
p02623
n, m, k = map(int, input().split()) a = [int(x) for x in input().split()] b = [int(x) for x in input().split()] acum = [0] * (n + 1) bcum = [0] * (m + 1) for i in range(n): acum[i + 1] = acum[i] + a[i] for j in range(m): bcum[j + 1] = bcum[j] + b[j] max_ans = 0 j = m for i in range(n): if acum[i] > k: ...
n, m, k = map(int, input().split()) a = [int(x) for x in input().split()] b = [int(x) for x in input().split()] acum = [0] * (n + 1) bcum = [0] * (m + 1) for i in range(n): acum[i + 1] = acum[i] + a[i] for j in range(m): bcum[j + 1] = bcum[j] + b[j] max_ans = 0 j = m for i in range(n + 1): if acum[i] > ...
[ "control_flow.loop.range.bounds.upper.change", "expression.operation.binary.add" ]
333,120
333,121
u434609232
python
p02623
def ii():return int(input()) def iim():return map(int,input().split()) def iil():return list(map(int,input().split())) import numpy as np def binarySearch(lis,key): ng = -1 ok = len(lis) while abs(ok-ng) > 1: mid = (ok+ng)//2 if isOk(lis,mid,key): ok = mid else: ng = mid return...
def ii():return int(input()) def iim():return map(int,input().split()) def iil():return list(map(int,input().split())) import numpy as np def binarySearch(lis,key): ng = -1 ok = len(lis) while abs(ok-ng) > 1: mid = (ok+ng)//2 if isOk(lis,mid,key): ok = mid else: ng = mid return...
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
333,142
333,143
u021916304
python
p02623
def ii():return int(input()) def iim():return map(int,input().split()) def iil():return list(map(int,input().split())) def binary_search(lis, item): low = 0 high = len(lis) - 1 inRange = high if lis[0] > item: return 0 while low <= high: mid = (low + high) //2 guess1 = lis...
def ii():return int(input()) def iim():return map(int,input().split()) def iil():return list(map(int,input().split())) def binary_search(lis, item): low = 0 high = len(lis) - 1 inRange = high if lis[0] > item: return 0 while low <= high: mid = (low + high) //2 guess1 = lis...
[ "assignment.value.change", "identifier.change", "call.function.change", "call.arguments.change" ]
333,145
333,146
u021916304
python
p02623
n,m,k=map(int,input().split()) a=list(map(int,input().split())) b=list(map(int,input().split())) import numpy as np import bisect ra=[0]+list(np.cumsum(a)) rb=[0]+list(np.cumsum(b)) ans=0 for i in range(n+1): capa = k - ra[i] if ra[i]>0: break j=bisect.bisect_right(rb,capa) ans=max(ans,...
n,m,k=map(int,input().split()) a=list(map(int,input().split())) b=list(map(int,input().split())) import numpy as np import bisect ra=[0]+list(np.cumsum(a)) rb=[0]+list(np.cumsum(b)) ans=0 for i in range(n+1): capa = k - ra[i] if ra[i]>k: break j=bisect.bisect_right(rb,capa) ans=max(ans,...
[ "identifier.replace.add", "literal.replace.remove", "control_flow.branch.if.condition.change" ]
333,160
333,161
u485319545
python
p02623
n,m,k=map(int,input().split()) a=list(map(int,input().split())) b=list(map(int,input().split())) import numpy as np import bisect ra=[0]+list(np.cumsum(a)) rb=[0]+list(np.cumsum(b)) ans=0 for i in range(n+1): capa = k - ra[i] if ra[i]>0: break j=bisect.bisect_right(rb,capa) ans=max(ans,...
n,m,k=map(int,input().split()) a=list(map(int,input().split())) b=list(map(int,input().split())) import numpy as np import bisect ra=[0]+list(np.cumsum(a)) rb=[0]+list(np.cumsum(b)) ans=0 for i in range(n+1): capa = k - ra[i] if ra[i]>k: break j=bisect.bisect_right(rb,capa) ans=max(ans,...
[ "identifier.replace.add", "literal.replace.remove", "control_flow.branch.if.condition.change" ]
333,162
333,161
u485319545
python
p02623
n,m,k=map(int,input().split()) a=list(map(int,input().split())) b=list(map(int,input().split())) import numpy as np import bisect ra=[0]+list(np.cumsum(a)) rb=[0]+list(np.cumsum(b)) ans=0 for i in range(n+1): capa = k - ra[i] if ra[i]<0: break j=bisect.bisect_right(rb,capa) ans=max(ans,...
n,m,k=map(int,input().split()) a=list(map(int,input().split())) b=list(map(int,input().split())) import numpy as np import bisect ra=[0]+list(np.cumsum(a)) rb=[0]+list(np.cumsum(b)) ans=0 for i in range(n+1): capa = k - ra[i] if ra[i]>k: break j=bisect.bisect_right(rb,capa) ans=max(ans,...
[ "control_flow.loop.for.condition.change" ]
333,163
333,161
u485319545
python
p02623
n, m, k = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, input().split())) na, nb = [0], [0] for i in range(n): na.append(na[i] + a[i]) for j in range(m): nb.append(nb[i] + b[i]) ans, j = 0, m for i in range(n + 1): if na[i] > k: break while nb[j] > k - na[i]: ...
n, m, k = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, input().split())) na, nb = [0], [0] for i in range(n): na.append(na[i] + a[i]) for j in range(m): nb.append(nb[j] + b[j]) ans, j = 0, m for i in range(n + 1): if na[i] > k: break while nb[j] > k - na[i]: ...
[ "identifier.change", "variable_access.subscript.index.change", "call.arguments.change", "expression.operation.binary.change" ]
333,172
333,173
u313291636
python
p02623
n, m, k = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, input().split())) na, nb = [0], [0] for i in range(n): na.append(na[i] + a[i]) for j in range(m): nb.append(nb[i] + b[i]) ans, j = 0, m for i in range(n + 1): if a[i] > k: break while b[j] > k - a[i]: ...
n, m, k = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, input().split())) na, nb = [0], [0] for i in range(n): na.append(na[i] + a[i]) for j in range(m): nb.append(nb[j] + b[j]) ans, j = 0, m for i in range(n + 1): if na[i] > k: break while nb[j] > k - na[i]: ...
[ "identifier.change", "variable_access.subscript.index.change", "call.arguments.change", "expression.operation.binary.change", "control_flow.branch.if.condition.change", "control_flow.loop.condition.change" ]
333,174
333,173
u313291636
python
p02623
import numpy as np import bisect n, m, k = map(int, input().split()) A = [0] + list(map(int,input().split())) # '0'冊目も入れとく B = [0] + list(map(int,input().split())) # 同上 a = np.cumsum(A) # 'A'の累積 b = np.cumsum(B) # 'B'同上 ans = 0 for i in range(n+1): # 二分探索_方針: A側で読む本の冊数を固定する! time = k - a[i] # ↑で固定した時の残り時間 tm...
import numpy as np import bisect n, m, k = map(int, input().split()) A = [0] + list(map(int,input().split())) # '0'冊目も入れとく B = [0] + list(map(int,input().split())) # 同上 a = np.cumsum(A) # 'A'の累積 b = np.cumsum(B) # 'B'同上 ans = 0 for i in range(n+1): # 二分探索_方針: A側で読む本の冊数を固定する! time = k - a[i] # ↑で固定した時の残り時間 if...
[ "control_flow.branch.if.add", "control_flow.break.add" ]
333,189
333,190
u680851063
python
p02623
import sys import numpy as np import math import collections from collections import deque from functools import reduce # input = sys.stdin.readline n, m, k = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, input().split())) a_t, b_t = [0], [0] for i in range(n): a_t.append(a_t[i] ...
import sys import numpy as np import math import collections from collections import deque from functools import reduce # input = sys.stdin.readline n, m, k = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, input().split())) a_t, b_t = [0], [0] for i in range(n): a_t.append(a_t[i] ...
[ "identifier.change", "control_flow.branch.if.condition.change" ]
333,193
333,194
u557792847
python
p02623
import sys import numpy as np import math import collections from collections import deque from functools import reduce # input = sys.stdin.readline n, m, k = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, input().split())) a_t, b_t = [0], [0] for i in range(n): a_t.append(a_t[i] ...
import sys import numpy as np import math import collections from collections import deque from functools import reduce # input = sys.stdin.readline n, m, k = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, input().split())) a_t, b_t = [0], [0] for i in range(n): a_t.append(a_t[i] ...
[ "identifier.change", "control_flow.branch.if.condition.change" ]
333,195
333,194
u557792847
python
p02623
from collections import deque 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]>k: break while b[j] > k-a[i]: j -= 1 ans =...
from collections import deque 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]>k: break while b[j] > k-a[i]: j -= 1 ans =...
[ "identifier.change", "call.arguments.change", "expression.operation.binary.change", "control_flow.loop.range.bounds.upper.change" ]
333,223
333,224
u221061152
python
p02623
from collections import defaultdict, deque, Counter from heapq import heappush, heappop, heapify from itertools import permutations, accumulate, combinations, combinations_with_replacement from math import sqrt, ceil, floor, factorial from bisect import bisect_left, bisect_right, insort_left, insort_right from copy imp...
from collections import defaultdict, deque, Counter from heapq import heappush, heappop, heapify from itertools import permutations, accumulate, combinations, combinations_with_replacement from math import sqrt, ceil, floor, factorial from bisect import bisect_left, bisect_right, insort_left, insort_right from copy imp...
[]
333,225
333,226
u279460955
python
p02623
from sys import stdin import bisect def main(): input = stdin.readline n, m, k = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, input().split())) c = [0] * (n + 1) for i in range(n): c[i + 1] = c[i] + a[i] d = [0] * (m + 1) for i in range(m): ...
from sys import stdin import bisect def main(): input = stdin.readline n, m, k = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, input().split())) c = [0] * (n + 1) for i in range(n): c[i + 1] = c[i] + a[i] d = [0] * (m + 1) for i in range(m): ...
[ "assignment.value.change", "identifier.change", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
333,241
333,242
u979552932
python
p02623
# C - Tsundoku from bisect import bisect from itertools import accumulate def main(): N, M, K, *AB = map(int, open(0).read().split()) cum_A, cum_B = tuple(accumulate(AB[:N])), tuple(accumulate(AB[N:])) candidates = [] for i, a_time in enumerate(cum_A, 1): if a_time > K: candidates....
# C - Tsundoku from bisect import bisect from itertools import accumulate def main(): N, M, K, *AB = map(int, open(0).read().split()) cum_A, cum_B = tuple(accumulate([0] + AB[:N])), tuple(accumulate(AB[N:])) candidates = [] for i, a_time in enumerate(cum_A): if a_time > K: candidat...
[ "call.arguments.change" ]
333,266
333,267
u077291787
python
p02623
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] + A A = list(accumulate(A)) B = [0] + B B = list(accumulate(B)) ans = 0 b_cnt = m for a_cnt in range(n+1): if a_cnt > k: continue while A[a_cnt]+B[b_cnt] > k:...
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] + A A = list(accumulate(A)) B = [0] + B B = list(accumulate(B)) ans = 0 b_cnt = m for a_cnt in range(n+1): if A[a_cnt] > k: continue while A[a_cnt]+B[b_cnt] >...
[ "control_flow.branch.if.condition.change", "control_flow.loop.for.condition.change" ]
333,275
333,276
u968404618
python
p02623
import bisect from itertools import* n,m,k,*x=[int(v)for l in open(0) for v in l.split()];a=accumulate([0]+x[:n]);b=[*accumulate(x[n:])];print(max(i+bisect.bisect(b,k-v)for i,v in enumerate(a)if k>v))
import bisect from itertools import* n,m,k,*x=[int(v)for l in open(0) for v in l.split()];a=accumulate([0]+x[:n]);b=[*accumulate(x[n:])];print(max(i+bisect.bisect(b,k-v)for i,v in enumerate(a)if v<=k))
[]
333,287
333,288
u345966487
python
p02623
# -*- coding: utf-8 -*- # スペース区切りの整数の入力 N,M,K = map(int, input().split()) Nnums = list(map(int, input().split())) Mnums = list(map(int, input().split())) Nmax=len(Nnums) Mmax=len(Mnums) Nsum=0 Ncnt=0 #Nのみの場合に何冊読めるか for Ni,Nl in enumerate(Nnums): Nsum += Nl Ncnt = Ni if Nsum > K: Nsum -= Nl Ncnt = Ni-1 ...
# -*- coding: utf-8 -*- # スペース区切りの整数の入力 N,M,K = map(int, input().split()) Nnums = list(map(int, input().split())) Mnums = list(map(int, input().split())) Nmax=len(Nnums) Mmax=len(Mnums) Nsum=0 Ncnt=0 #Nのみの場合に何冊読めるか for Ni,Nl in enumerate(Nnums): Nsum += Nl Ncnt = Ni if Nsum > K: Nsum -= Nl Ncnt = Ni-1 ...
[]
333,291
333,292
u687416863
python
p02623
from bisect import * n, m, k = map(int, input().split()) A = [0] for x in map(int, input().split()): if A[-1]+x <= k: A.append(A[-1]+x) B = [0] for x in map(int, input().split()): if B[-1]+x <= k: B.append(B[-1]+x) ans = 0 for i in range(len(A)): j = bisect_right(B, k-A[i]) - 1 # if k >= A[i] + B[j]: ...
from bisect import * n, m, k = map(int, input().split()) A = [0] for x in map(int, input().split()): if A[-1]+x > k: break A.append(A[-1]+x) B = [0] for x in map(int, input().split()): if B[-1]+x > k: break B.append(B[-1]+x) ans = 0 for i in range(len(A)): j = bisect_right(B, k-A[i]) - 1 ans = m...
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change", "control_flow.break.add" ]
333,306
333,307
u525065967
python
p02623
from bisect import * n, m, k = map(int, input().split()) A = [0] for x in map(int, input().split()): if A[-1]+x <= k: A.append(A[-1]+x) B = [0] for x in map(int, input().split()): if B[-1]+x <= k: B.append(B[-1]+x) ans = 0 for i in range(len(A)): j = bisect_right(B, k-A[i]) - 1 # if k >= A[i] + B[j]: ...
from bisect import * n, m, k = map(int, input().split()) A = [0] for x in map(int, input().split()): if A[-1]+x > k: break A.append(A[-1]+x) B = [0] for x in map(int, input().split()): if B[-1]+x > k: break B.append(B[-1]+x) ans = 0 for i in range(len(A)): j = bisect_right(B, k-A[i]) - 1 ans = ...
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change", "control_flow.break.add" ]
333,306
333,308
u525065967
python
p02623
N,M,K=map(int,input().split()) A=list(map(int,input().split())) B=list(map(int,input().split())) 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]) j=M ans=0 for i in range(N):#aは小さい方から if a[i]>K: #a[0]=0なのでいきなりbreakすることはない break while b[j]>K-a[i] : #b...
N,M,K=map(int,input().split()) A=list(map(int,input().split())) B=list(map(int,input().split())) 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]) j=M ans=0 for i in range(N+1):#aは小さい方から if a[i]>K: #a[0]=0なのでいきなりbreakすることはない break while b[j]>K-a[i] : ...
[ "control_flow.loop.range.bounds.upper.change", "expression.operation.binary.add" ]
333,321
333,322
u733866054
python
p02623
n, m, k = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, input().split())) ans = 0 s = 0 b_count = 0 for i in range(m): if s + b[i] <= k: s += b[i] ans += 1 b_count = i else: break a_count = 0 while True: if a_count < n and s+a[a_count] <= k: ...
n, m, k = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, input().split())) ans = 0 s = 0 b_count = 0 for i in range(m): if s + b[i] <= k: s += b[i] ans += 1 b_count = i+1 else: break a_count = 0 while True: if a_count < n and s+a[a_count] <= k...
[ "assignment.change", "control_flow.loop.range.bounds.lower.change", "expression.operation.binary.add" ]
333,325
333,326
u860657719
python
p02623
import sys sys.setrecursionlimit(2147483647) N, M, K=map(int,input().split()) A=list(map(int,input().split())) B=list(map(int,input().split())) Asum = [0] Bsum = [0] count = 0 for p in A: count += p Asum.append(count) count = 0 for p in B: count += p Bsum.append(count) best = 0 Blast = M-1 for t in ran...
import sys sys.setrecursionlimit(2147483647) N, M, K=map(int,input().split()) A=list(map(int,input().split())) B=list(map(int,input().split())) Asum = [0] Bsum = [0] count = 0 for p in A: count += p Asum.append(count) count = 0 for p in B: count += p Bsum.append(count) best = 0 Blast = M for t in range...
[ "expression.operation.binary.remove", "control_flow.loop.for.condition.change" ]
333,327
333,328
u401810884
python
p02623
import sys import math import heapq from collections import defaultdict, deque sys.setrecursionlimit(10**6) input = sys.stdin.readline def r(): return int(input()) def rm(): return map(int,input().split()) def rl(): return list(map(int,input().split())) '''C Tsundoku''' n,m,k=rm() a=rl() b=rl() c=[0]*(n+1)...
import sys import math import heapq from collections import defaultdict, deque sys.setrecursionlimit(10**6) input = sys.stdin.readline def r(): return int(input()) def rm(): return map(int,input().split()) def rl(): return list(map(int,input().split())) '''C Tsundoku''' n,m,k=rm() a=rl() b=rl() c=[0]*(n+1)...
[ "assignment.value.change", "identifier.change", "expression.operation.binary.change" ]
333,347
333,348
u536230475
python
p02623
import sys import math import heapq from collections import defaultdict, deque sys.setrecursionlimit(10**6) input = sys.stdin.readline def r(): return int(input()) def rm(): return map(int,input().split()) def rl(): return list(map(int,input().split())) '''C Tsundoku''' n,m,k=rm() a=rl() b=rl() c=[0]*(n+1)...
import sys import math import heapq from collections import defaultdict, deque sys.setrecursionlimit(10**6) input = sys.stdin.readline def r(): return int(input()) def rm(): return map(int,input().split()) def rl(): return list(map(int,input().split())) '''C Tsundoku''' n,m,k=rm() a=rl() b=rl() c=[0]*(n+1)...
[ "assignment.value.change", "identifier.change", "expression.operation.binary.change", "control_flow.loop.condition.change" ]
333,349
333,348
u536230475
python
p02623
from collections import deque def solve(): 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 = 0 j = M for...
from collections import deque def solve(): 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 = 0 j = M ...
[ "identifier.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change", "misc.opposites", "expression.operator.compare.change", "control_flow.loop.condition.change" ]
333,354
333,355
u051358943
python
p02623
import sys import math from collections import deque n,m,k=map(int,input().split()) A = list(map(int,input().split())) B = list(map(int,input().split())) 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]) ans,j=0,m for i in range(n): if a[i] > k : break ...
import sys import math from collections import deque n,m,k=map(int,input().split()) A = list(map(int,input().split())) B = list(map(int,input().split())) 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]) ans,j=0,m for i in range(n+1): if a[i] > k : break...
[ "control_flow.loop.range.bounds.upper.change", "expression.operation.binary.add" ]
333,363
333,364
u524534026
python
p02623
#import #=input() #=int(input()) n,m,k=map(int,input().split()) a=list(map(int,input().split())) b=list(map(int,input().split())) #=[list(map(int,input().split())) for _ in range()] la = [0] lb = [0] for i in range(n): la += [a[i]+la[i]] for i in range(m): lb += [b[i]+lb[i]] j = m ans = 0 for i in range(n): ...
#import #=input() #=int(input()) n,m,k=map(int,input().split()) a=list(map(int,input().split())) b=list(map(int,input().split())) #=[list(map(int,input().split())) for _ in range()] la = [0] lb = [0] for i in range(n): la += [a[i]+la[i]] for i in range(m): lb += [b[i]+lb[i]] j = m ans = 0 for i in range(n+1):...
[ "control_flow.loop.range.bounds.upper.change", "expression.operation.binary.add" ]
333,378
333,379
u957098479
python
p02623
from itertools import accumulate import bisect n, m, k = map(int,input().split()) a_lst = [0] + list(accumulate(list(map(int,input().split())))) b_lst = list(accumulate(list(map(int,input().split())))) ans = 0 for i in range(n+1): cnt = i num = k - a_lst[i] if num < 0: continue b_yomeru = bisec...
from itertools import accumulate import bisect n, m, k = map(int,input().split()) a_lst = [0] + list(accumulate(list(map(int,input().split())))) b_lst = list(accumulate(list(map(int,input().split())))) ans = 0 for i in range(n+1): cnt = i num = k - a_lst[i] if num < 0: continue b_yomeru = bisec...
[ "assignment.value.change", "identifier.change" ]
333,403
333,404
u972658925
python
p02623
import itertools N,M,K=map(int, input().split()) A=list(map(int, input().split())) B=list(map(int, input().split())) sumA = list(itertools.accumulate(A)) sumB = list(itertools.accumulate(B)) j=M-1 while K<sumB[j] and j>0: j-=1 ans=j for i in range(N): if sumA[i]>K: break while K<sumA[i]+sumB[j] an...
import itertools N,M,K=map(int, input().split()) A=list(map(int, input().split())) B=list(map(int, input().split())) sumA = list(itertools.accumulate(A)) sumB = list(itertools.accumulate(B)) j=M-1 while K<sumB[j] and j>=0: j-=1 ans=j+1 for i in range(N): if sumA[i]>K: break while K<sumA[i]+sumB[j]...
[ "expression.operator.compare.change", "control_flow.loop.condition.change" ]
333,423
333,424
u585963734
python
p02623
import itertools N,M,K=map(int, input().split()) A=list(map(int, input().split())) B=list(map(int, input().split())) sumA = list(itertools.accumulate(A)) sumB = list(itertools.accumulate(B)) j=M-1 while K<sumB[j] and j>0: j-=1 ans=j for i in range(1,N): if sumA[i]>K: break while K<sumA[i]+sumB[j] ...
import itertools N,M,K=map(int, input().split()) A=list(map(int, input().split())) B=list(map(int, input().split())) sumA = list(itertools.accumulate(A)) sumB = list(itertools.accumulate(B)) j=M-1 while K<sumB[j] and j>=0: j-=1 ans=j+1 for i in range(N): if sumA[i]>K: break while K<sumA[i]+sumB[j]...
[ "expression.operator.compare.change", "control_flow.loop.condition.change", "call.arguments.change" ]
333,426
333,424
u585963734
python
p02623
import itertools N,M,K=map(int, input().split()) A=list(map(int, input().split())) B=list(map(int, input().split())) sumA = list(itertools.accumulate(A)) sumB = list(itertools.accumulate(B)) j=M-1 while K<sumB[j] and j>0: j-=1 ans=j for i in range(1,N): if sumA[i]>K: break while K<sumA[i]+sumB[j] ...
import itertools N,M,K=map(int, input().split()) A=list(map(int, input().split())) B=list(map(int, input().split())) sumA = list(itertools.accumulate(A)) sumB = list(itertools.accumulate(B)) j=M-1 while K<sumB[j] and j>=0: j-=1 ans=j+1 for i in range(N): if sumA[i]>K: break while K<sumA[i]+sumB[j]...
[ "expression.operator.compare.change", "control_flow.loop.condition.change", "call.arguments.change" ]
333,427
333,424
u585963734
python
p02623
n,m,k=map(int,input().split()) a=list(map(int,input().split())) b=list(map(int,input().split())) if sum(a)+sum(b)<k: ans=m+n else: numa=[0] numb=[0] for i in range(n): numa.append(numa[-1]+a[i]) for j in range(m): numb.append(numb[-1]+b[i]) ans=0 for i in range(n+1): ...
n,m,k=map(int,input().split()) a=list(map(int,input().split())) b=list(map(int,input().split())) if sum(a)+sum(b)<k: ans=m+n else: numa=[0] numb=[0] for i in range(n): numa.append(numa[-1]+a[i]) for j in range(m): numb.append(numb[-1]+b[j]) ans=0 for i in range(n+1): ...
[ "identifier.change", "variable_access.subscript.index.change", "call.arguments.change", "expression.operation.binary.change" ]
333,434
333,435
u366886346
python
p02623
import bisect n,m,k=map(int,input().split()) arr1=list(map(int,input().split())) arr2=list(map(int,input().split())) acum1=[0] for i in range(n): acum1.append(acum1[-1]+arr1[i]) acum2=[0] for i in range(m): acum2.append(acum2[-1]+arr2[i]) ans=0 for i in range(1,n+1): if acum1[i]>k: break ans=max(ans,i+bise...
import bisect n,m,k=map(int,input().split()) arr1=list(map(int,input().split())) arr2=list(map(int,input().split())) acum1=[0] for i in range(n): acum1.append(acum1[-1]+arr1[i]) acum2=[0] for i in range(m): acum2.append(acum2[-1]+arr2[i]) ans=0 for i in range(n+1): if acum1[i]>k: break ans=max(ans,i+bisect...
[ "call.arguments.change" ]
333,462
333,463
u163320134
python
p02623
#!usr/bin/env pypy3 from collections import defaultdict, deque from heapq import heappush, heappop from itertools import permutations, accumulate import sys import math import bisect def LI(): return [int(x) for x in sys.stdin.readline().split()] def I(): return int(sys.stdin.readline()) def LS():return [list(x) for x ...
#!usr/bin/env pypy3 from collections import defaultdict, deque from heapq import heappush, heappop from itertools import permutations, accumulate import sys import math import bisect def LI(): return [int(x) for x in sys.stdin.readline().split()] def I(): return int(sys.stdin.readline()) def LS():return [list(x) for x ...
[ "assignment.value.change", "identifier.change" ]
333,464
333,465
u481187938
python
p02623
#!usr/bin/env pypy3 from collections import defaultdict, deque from heapq import heappush, heappop from itertools import permutations, accumulate import sys import math import bisect def LI(): return [int(x) for x in sys.stdin.readline().split()] def I(): return int(sys.stdin.readline()) def LS():return [list(x) for x ...
#!usr/bin/env pypy3 from collections import defaultdict, deque from heapq import heappush, heappop from itertools import permutations, accumulate import sys import math import bisect def LI(): return [int(x) for x in sys.stdin.readline().split()] def I(): return int(sys.stdin.readline()) def LS():return [list(x) for x ...
[ "assignment.variable.change", "identifier.change", "assignment.value.change", "call.arguments.change", "expression.operation.binary.change" ]
333,466
333,465
u481187938
python
p02623
N, M, K = map(int, input().split()) A = [int(i) for i in input().split()] B = [int(j) for j in 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] > K: break while b[j] > K - a[i]: ...
N, M, K = map(int, input().split()) A = [int(i) for i in input().split()] B = [int(j) for j in 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] > K: break while b[j] > K - a[i]: ...
[]
333,477
333,478
u116484168
python
p02623
from bisect import bisect_right from itertools import accumulate N, M, K = [int(x) for x in input().split()] a_book = [0] + list(accumulate([int(x) for x in input().split()])) b_book = [0] + list(accumulate([int(x) for x in input().split()])) check = {} max_books = 0 for i, a in enumerate(a_book): b_pos = bise...
from bisect import bisect_right from itertools import accumulate N, M, K = [int(x) for x in input().split()] a_book = [0] + list(accumulate([int(x) for x in input().split()])) b_book = [0] + list(accumulate([int(x) for x in input().split()])) check = {} max_books = 0 for i, a in enumerate(a_book): if a > K: ...
[ "control_flow.branch.if.add", "control_flow.break.add" ]
333,481
333,482
u891516200
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 import numpy as np a=np.cumsum(A) b=np.cumsum(B) ans=0 j=M for i in range(N): if a[i]>K: break while b[j]>K-a[i]: j-=1 ans=max(ans, i+j) print(ans)
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 import numpy as np a=np.cumsum(A) b=np.cumsum(B) ans=0 j=M for i in range(N+1): if a[i]>K: break while b[j]>K-a[i]: j-=1 ans=max(ans, i+j) print(ans)
[ "control_flow.loop.range.bounds.upper.change", "expression.operation.binary.add" ]
333,494
333,495
u193927973
python
p02623
import itertools 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 a_cum = [0] + list(itertools.accumulate(a)) b_cum = [0] + list(itertools.accumulate(b)) y = m for x in range(len(a_cum)): if a_cum[x] > k: ...
import itertools 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 a_cum = [0] + list(itertools.accumulate(a)) b_cum = [0] + list(itertools.accumulate(b)) y = m # len(b_cum) - 1 for x in range(len(a_cum)): i...
[ "identifier.change", "control_flow.loop.condition.change" ]
333,522
333,523
u285022453
python
p02623
import itertools 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 a_cum = [0] + list(itertools.accumulate(a)) b_cum = [0] + list(itertools.accumulate(b)) y = m for x in range(len(a_cum) + 1): if a_cum[x] > k...
import itertools 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 a_cum = [0] + list(itertools.accumulate(a)) b_cum = [0] + list(itertools.accumulate(b)) y = m # len(b_cum) - 1 for x in range(len(a_cum)): i...
[ "expression.operation.binary.remove", "identifier.change", "control_flow.loop.condition.change" ]
333,524
333,523
u285022453
python
p02623
N, M, K = map(int, input().split()) A = list(map(int, input().split())) B = list(map(int, input().split())) sum_A = [0] for i,a in enumerate(A, 1): tmp = sum_A[i-1] + a if tmp <= K: sum_A.append(tmp) mark_A = i else: break sum_B = [0] for i,b in enumerate(B, 1): tmp = sum_B...
N, M, K = map(int, input().split()) A = list(map(int, input().split())) B = list(map(int, input().split())) sum_A = [0] for i,a in enumerate(A, 1): tmp = sum_A[i-1] + a if tmp <= K: sum_A.append(tmp) mark_A = i else: break sum_B = [0] for i,b in enumerate(B, 1): tmp = sum_B...
[ "assignment.value.change" ]
333,525
333,526
u531220228
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 = [0] + list(accumulate(a)) B = [0] + list(accumulate(b)) ans = 0 j = m for i in range(n + 1): if A[i] > k: break while B[j] > k - a[i]: j -= 1 ans...
n, m, k = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, input().split())) from itertools import accumulate A = [0] + list(accumulate(a)) B = [0] + list(accumulate(b)) ans = 0 j = m for i in range(n + 1): if A[i] > k: break while B[j] > k - A[i]: j -= 1 ans...
[ "identifier.change", "control_flow.loop.condition.change" ]
333,527
333,528
u960080897
python
p02623
n, m, k = list(map(int, input().split())) ns = list(map(int, input().split())) ms = list(map(int, input().split())) nss = [0] for i, v in enumerate(ns): nss.append(nss[i] + ns[i]) mss = [0] for i, v in enumerate(ms): mss.append(mss[i] + ms[i]) mx = 0 j = m for i in range(n + 1): if nss[i] > k: br...
n, m, k = list(map(int, input().split())) ns = list(map(int, input().split())) ms = list(map(int, input().split())) nss = [0] for i, v in enumerate(ns): nss.append(nss[i] + ns[i]) mss = [0] for i, v in enumerate(ms): mss.append(mss[i] + ms[i]) mx = 0 j = m for i in range(n + 1): if nss[i] > k: br...
[ "call.remove" ]
333,533
333,534
u143441425
python
p02623
n, m, k = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, input().split())) a_sum = [0] b_sum = [0] for i in range(n): a_sum.append(a_sum[i] + a[i]) for i in range(m): b_sum.append(b_sum[j] + b[j]) ans, j = 0, m for i in range(n + 1): if a_sum[i] > k: break ...
n, m, k = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, input().split())) a_sum = [0] b_sum = [0] for i in range(n): a_sum.append(a_sum[i] + a[i]) for i in range(m): b_sum.append(b_sum[i] + b[i]) ans, j = 0, m for i in range(n + 1): if a_sum[i] > k: break ...
[ "identifier.change", "variable_access.subscript.index.change", "call.arguments.change", "expression.operation.binary.change", "control_flow.loop.condition.change" ]
333,561
333,562
u723345499
python
p02623
(n,m,k),*A,=[list(map(int,i.split())) for i in open(0)] a=A[0] b=A[1] aa=[0] bb=[0] for i in range(n): aa.append(aa[i]+a[i]) for i in range(m): bb.append(bb[i]+b[i]) ans=0 for i in range(1,n+1): if aa[i]>k: break while bb[m]>k-aa[i]: m-=1 ans=max(ans,m+i) print(ans)
(n,m,k),*A,=[list(map(int,i.split())) for i in open(0)] a=A[0] b=A[1] aa=[0] bb=[0] for i in range(n): aa.append(aa[i]+a[i]) for i in range(m): bb.append(bb[i]+b[i]) ans=0 for i in range(n+1): if aa[i]>k: break while bb[m]>k-aa[i]: m-=1 ans=max(ans,m+i) print(ans)
[ "call.arguments.change" ]
333,564
333,565
u156383602
python
p02623
(n,m,k),*A,=[list(map(int,i.split())) for i in open(0)] a=A[0] b=A[1] aa=[0] bb=[0] for i in range(n): aa.append(aa[-1]+a[i]) for i in range(m): bb.append(bb[-1]+b[i]) ans=0 for i in range(1,n+1): if aa[i]>k: break while bb[m]>k-aa[i]: m-=1 ans=max(ans,m+i) print(ans)
(n,m,k),*A,=[list(map(int,i.split())) for i in open(0)] a=A[0] b=A[1] aa=[0] bb=[0] for i in range(n): aa.append(aa[i]+a[i]) for i in range(m): bb.append(bb[i]+b[i]) ans=0 for i in range(n+1): if aa[i]>k: break while bb[m]>k-aa[i]: m-=1 ans=max(ans,m+i) print(ans)
[ "variable_access.subscript.index.change", "call.arguments.change", "expression.operation.binary.change", "expression.operation.unary.remove" ]
333,567
333,565
u156383602
python
p02623
import bisect N, M, K = map(int, input().split()) A = list(map(int, input().split())) B = list(map(int, input().split())) A2 = [0] * (N + 1) for i in range(1, N + 1): A2[i] = A2[i - 1] + A[i - 1] B2 = [0] * (M + 1) for i in range(1, M + 1): B2[i] = B2[i - 1] + B[i - 1] #print(A2, B2) #print(bisect.bisect_left(B2...
import bisect N, M, K = map(int, input().split()) A = list(map(int, input().split())) B = list(map(int, input().split())) A2 = [0] * (N + 1) for i in range(1, N + 1): A2[i] = A2[i - 1] + A[i - 1] B2 = [0] * (M + 1) for i in range(1, M + 1): B2[i] = B2[i - 1] + B[i - 1] #print(A2, B2) #print(bisect.bisect_left(B2...
[ "assignment.value.change", "identifier.change", "expression.operation.binary.change" ]
333,581
333,582
u748241164
python
p02623
from bisect import bisect N, M, K = map(int, input().split()) A = [0]+list(map(int, input().split())) B = list(map(int, input().split())) R_B = [0]*(M+1) i = 0 while i < M: R_B[i+1] = R_B[i]+B[i] i += 1 ans = 0 i = 0 while i < N and K >= A[i]: K -= A[i] idx = bisect(R_B, K) ans = max(ans, i+idx-1) i += 1 ...
from bisect import bisect N, M, K = map(int, input().split()) A = [0]+list(map(int, input().split())) B = list(map(int, input().split())) R_B = [0]*(M+1) i = 0 while i < M: R_B[i+1] = R_B[i]+B[i] i += 1 ans = 0 i = 0 while i <= N and K >= A[i]: K -= A[i] idx = bisect(R_B, K) ans = max(ans, i+idx-1) i += 1...
[ "expression.operator.compare.change", "control_flow.loop.condition.change" ]
333,588
333,589
u978178314
python
p02623
import bisect N, M, K = map(int, input().split()) A = list(map(int, input().split())) B = list(map(int, input().split())) a = [0] b = [0] for i in range(N): a += [a[i] + A[i]] for i in range(M): b += [b[i] + B[i]] ans = 0 for i in range(N+1): if A[i] <= K: ans = max(ans, i + bisect.bisect_right(...
import bisect N, M, K = map(int, input().split()) A = list(map(int, input().split())) B = list(map(int, input().split())) a = [0] b = [0] for i in range(N): a += [a[i] + A[i]] for i in range(M): b += [b[i] + B[i]] ans = 0 for i in range(N+1): if a[i] <= K: ans = max(ans, i + bisect.bisect_right(...
[ "identifier.change", "control_flow.branch.if.condition.change" ]
333,601
333,602
u686036872
python
p02623
from itertools import accumulate 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()] A=list(accumulate(a)) B=list(accumulate(b)) ans=1+bisect.bisect_right(B,k) for i in range(len(a)): r = (k-A[i]) if r<=0: break #print(r,bisect.bisect...
from itertools import accumulate 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()] A=list(accumulate(a)) B=list(accumulate(b)) ans=bisect.bisect_right(B,k) for i in range(len(a)): r = (k-A[i]) if r<0: break #print(r,bisect.bisect_le...
[ "expression.operation.binary.remove", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
333,621
333,622
u349091349
python
p02623
from itertools import accumulate 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()] A=list(accumulate(a)) B=list(accumulate(b)) ans=1+bisect.bisect_right(B,k) for i in range(len(a)): r = (k-A[i]) if r<=0: break #print(r,bisect.bisect...
from itertools import accumulate 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()] A=list(accumulate(a)) B=list(accumulate(b)) ans=bisect.bisect_right(B,k) for i in range(len(a)): r = (k-A[i]) if r<0: break #print(r,bisect.bisect_le...
[ "expression.operation.binary.remove", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
333,624
333,622
u349091349
python