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
p02747
import re pattern = re.compile("(hi)+") s = input() print("YES" if pattern.fullmatch(s) else "NO")
import re pattern = re.compile("(hi)+") s = input() print("Yes" if pattern.fullmatch(s) else "No")
[ "literal.string.change", "literal.string.case.change", "call.arguments.change", "io.output.change" ]
527,048
527,049
u316175331
python
p02747
import bisect import cmath import heapq import itertools import math import operator import os import random import re import string import sys from collections import Counter, deque, defaultdict from copy import deepcopy from decimal import Decimal from math import gcd from functools import lru_cache, reduce from oper...
import bisect import cmath import heapq import itertools import math import operator import os import random import re import string import sys from collections import Counter, deque, defaultdict from copy import deepcopy from decimal import Decimal from math import gcd from functools import lru_cache, reduce from oper...
[ "literal.number.integer.change", "call.arguments.change", "control_flow.loop.range.bounds.upper.change", "call.arguments.add" ]
527,054
527,055
u389910364
python
p02748
import sys import heapq import re from itertools import permutations from bisect import bisect_left, bisect_right from collections import Counter, deque from math import gcd from math import factorial, sqrt from functools import lru_cache, reduce INF = 1 << 60 mod = 1000000007 sys.setrecursionlimit(10 ** 7) input = sys...
import sys import heapq import re from itertools import permutations from bisect import bisect_left, bisect_right from collections import Counter, deque from math import gcd from math import factorial, sqrt from functools import lru_cache, reduce INF = 1 << 60 mod = 1000000007 sys.setrecursionlimit(10 ** 7) input = sys...
[ "assignment.value.change", "identifier.change", "call.arguments.change", "expression.operation.binary.change" ]
527,070
527,071
u426572476
python
p02748
A, B, M = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, input().split())) dis = [] for i in range(M): dis.append(list(map(int, input().split()))) total = [] total.append(min(a) + min(b)) for k in range(M): x = dis[k][0] - 1 y = dis[k][1] - 1 c = dis[k][2] - 1 discount = a...
A, B, M = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, input().split())) dis = [] for i in range(M): dis.append(list(map(int, input().split()))) total = [] total.append(min(a) + min(b)) for k in range(M): x = dis[k][0] - 1 y = dis[k][1] - 1 c = dis[k][2] discount = a[x] ...
[ "expression.operation.binary.remove" ]
527,076
527,077
u479638406
python
p02748
a, b, m = map(int, input().split()) A = [int(ae) for ae in input().split()] B = [int(be) for be in input().split()] amin = min(A) bmin = min(B) smin = amin + bmin for i in range(m): x, y, c= map(int, input().split()) th = smin -c apmin = A[x-1] if apmin > th: pass else: bpmin = B[y-1] spmin = ap...
a, b, m = map(int, input().split()) A = [int(ae) for ae in input().split()] B = [int(be) for be in input().split()] amin = min(A) bmin = min(B) smin = amin + bmin for i in range(m): x, y, c= map(int, input().split()) th = smin + c apmin = A[x-1] if apmin > th: pass else: bpmin = B[y-1] spmin = a...
[ "misc.opposites", "expression.operator.arithmetic.change", "assignment.value.change", "expression.operation.binary.change" ]
527,080
527,081
u561862393
python
p02748
a, b, m = map(int, input().split()) A = [int(ae) for ae in input().split()] B = [int(be) for be in input().split()] amin = min(A) bmin = min(B) smin = amin + bmin for i in range(m): x, y, c= map(int, input().split()) th = smin -c apmin = A[x] if apmin > th: pass else: bpmin = B[y] spmin = apmin ...
a, b, m = map(int, input().split()) A = [int(ae) for ae in input().split()] B = [int(be) for be in input().split()] amin = min(A) bmin = min(B) smin = amin + bmin for i in range(m): x, y, c= map(int, input().split()) th = smin + c apmin = A[x-1] if apmin > th: pass else: bpmin = B[y-1] spmin = a...
[ "misc.opposites", "expression.operator.arithmetic.change", "assignment.value.change", "expression.operation.binary.change" ]
527,082
527,081
u561862393
python
p02748
import cmath import sys INF=10**18 MOD=10**9+7 MAX=10**5+7 def main(): A,B,M=map(int, input().split()) a=list(map(int, input().split())) b=list(map(int, input().split())) ans=min(a)+min(b) for i in range(M): x,y,c=map(int, input().split()) x-=1 y-=1 ans=max(ans, a[x]+b[y]-c) print(...
import cmath import sys INF=10**18 MOD=10**9+7 MAX=10**5+7 def main(): A,B,M=map(int, input().split()) a=list(map(int, input().split())) b=list(map(int, input().split())) ans=min(a)+min(b) for i in range(M): x,y,c=map(int, input().split()) x-=1 y-=1 ans=min(ans, a[x]+b[y]-c) print(...
[ "misc.opposites", "assignment.value.change", "identifier.change", "call.function.change" ]
527,083
527,084
u768152935
python
p02748
a,b,m=map(int,input().split()) price_A=list(map(int,input().split())) price_B=list(map(int,input().split())) coupon=[] for _ in range(m): coupon.append(list(map(int,input().split()))) ans=min(price_A)+min(price_B[0]) for i in range(m): deprice=price_A[coupon[i][0]-1]+price_B[coupon[i][1]-1]-coupon[i][2] if depric...
a,b,m=map(int,input().split()) price_A=list(map(int,input().split())) price_B=list(map(int,input().split())) coupon=[] for _ in range(m): coupon.append(list(map(int,input().split()))) ans=min(price_A)+min(price_B) for i in range(m): deprice=price_A[coupon[i][0]-1]+price_B[coupon[i][1]-1]-coupon[i][2] if deprice <...
[]
527,093
527,094
u281796054
python
p02748
numA, numB, numCoupon = map(int, input().split(' ')) priceA = map(int, input().split(' ')) priceB = map(int, input().split(' ')) # initial best price bestPrice = min(priceA) + min(priceB) for n in range(numCoupon): # get coupon details typeA, typeB, discount = map(int, input().split(' ')) # calculate price when...
numA, numB, numCoupon = map(int, input().split(' ')) priceA = list(map(int, input().split(' '))) priceB = list(map(int, input().split(' '))) # initial best price bestPrice = min(priceA) + min(priceB) for n in range(numCoupon): # get coupon details typeA, typeB, discount = map(int, input().split(' ')) # calculat...
[ "assignment.value.change", "identifier.change", "call.function.change", "call.arguments.change" ]
527,112
527,113
u830742419
python
p02748
A, B, m = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, input().split())) l = [input().split() for i in range(m)] ans = min(a) + min(b) for i in range(m): ai = a[int(l[i][0]) - 1] bi = b[int(l[i][1]) - 1] ci = int(l[i][2]) nc = ai + bi - ci ans = min(ans, nc) print(...
A, B, m = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, input().split())) l = [input().split() for i in range(m)] ans = min(a) + min(b) for i in range(m): ai = a[int(l[i][0]) - 1] bi = b[int(l[i][1]) - 1] ci = int(l[i][2]) nc = ai + bi - ci ans = min(ans, nc) print...
[ "identifier.change", "call.arguments.change", "io.output.change" ]
527,116
527,117
u163874353
python
p02748
listA=[] while True: try: listA.append(list(map(int,input().split()))) except: break; money = min(listA[1]) + min(listA[2]) for k in range(listA[0][2]): wari = 1000 a = listA[k+3][0] b = listA[k+3][1] if wari > listA[1][a-1] + listA[2][b-1] - listA[k+3][2]: ...
listA=[] while True: try: listA.append(list(map(int,input().split()))) except: break; money = min(listA[1]) + min(listA[2]) wari = 100000000 for k in range(listA[0][2]): a = listA[k+3][0] b = listA[k+3][1] if wari > listA[1][a-1] + listA[2][b-1] - listA[k+3][2]: ...
[ "assignment.add", "assignment.remove" ]
527,124
527,123
u771007149
python
p02748
A, B, M = map(int, input().split()) a = [int(i) for i in input().split] b = [int(i) for i in input().split] ans = min(a) + min(b) for i in range(M): x, y, c = map(int, input().split()) val = a[x-1] + b[y-1] - c ans = min(ans, val) print(ans)
A, B, M = map(int, input().split()) a = [int(i) for i in input().split()] b = [int(i) for i in input().split()] ans = min(a) + min(b) for i in range(M): x, y, c = map(int, input().split()) val = a[x-1] + b[y-1] - c ans = min(ans, val) print(ans)
[ "call.add" ]
527,128
527,129
u463775490
python
p02748
A, B, M = map(int, input().split()) a = [int(i) for i in input().split()] b = [int(i) for i in input().split()] data = [list(map(int, input().split())) for _ in range(M)] aMIN = min(a) bMIN = min(b) MIN = aMIN + bMIN for k in data: min(MIN, a[k[0]-1]+b[k[1]-1]-k[2]) print(MIN)
A, B, M = map(int, input().split()) a = [int(i) for i in input().split()] b = [int(i) for i in input().split()] data = [list(map(int, input().split())) for _ in range(M)] aMIN = min(a) bMIN = min(b) MIN = aMIN + bMIN for k in data: MIN = min(MIN, a[k[0]-1]+b[k[1]-1]-k[2]) print(MIN)
[ "assignment.add" ]
527,139
527,140
u441694890
python
p02748
_, _, M = map(int, input().split(" ")) a = list(map(int, input().split(" "))) b = list(map(int, input().split(" "))) min = min(a) + min(b) for i in range(M): x, y, c = map(int, input().split(" ")) s = a[x] + b[y] - c if min > s: min = s print(min)
_, _, M = map(int, input().split(" ")) a = list(map(int, input().split(" "))) b = list(map(int, input().split(" "))) min = min(a) + min(b) for i in range(M): x, y, c = map(int, input().split(" ")) s = a[x-1] + b[y-1] - c if min > s: min = s print(min)
[ "assignment.change" ]
527,162
527,163
u665224938
python
p02748
#B a,b,m=map(int,input().split()) al=list(map(int,input().split())) bl=list(map(int,input().split())) amin=min(al) bmin=min(bl) minp=amin+bmin print(amin,bmin) for i in range(m): num=list(map(int,input().split())) price=al[num[0]-1]+bl[num[1]-1]-num[2] minp=min(price,minp) print(minp)
#B a,b,m=map(int,input().split()) al=list(map(int,input().split())) bl=list(map(int,input().split())) amin=min(al) bmin=min(bl) minp=amin+bmin for i in range(m): num=list(map(int,input().split())) price=al[num[0]-1]+bl[num[1]-1]-num[2] minp=min(price,minp) print(minp)
[ "call.remove" ]
527,172
527,173
u490489966
python
p02748
a,b,m = map(int,input().split()) A = list(map(int,input().split())) B = list(map(int,input().split())) xyc = [map(int,input().split()) for i in range(m)] ans = 100000000 for i in range(m): x,y,c = xyc[i] cost = A[x-1] + B[y-1] - c if ans > cost: ans = cost if cost > min(A) + min(B): ans = mi...
a,b,m = map(int,input().split()) A = list(map(int,input().split())) B = list(map(int,input().split())) xyc = [map(int,input().split()) for i in range(m)] ans = 100000000 for i in range(m): x,y,c = xyc[i] cost = A[x-1] + B[y-1] - c if ans > cost: ans = cost if ans > min(A) + min(B): ans = min...
[ "identifier.change", "control_flow.branch.if.condition.change" ]
527,178
527,179
u133833119
python
p02748
import numpy as np A, B, M = map(int,input().split()) a = np.array([int(num) for num in input().split()]) a_min = np.min(a) b = np.array([int(num) for num in input().split()]) b_min = np.min(b) total_min= a_min + b_min for i in range(0, M): x, y, c = map(int,input().split()) min_can = a[x-1] + b[y-1] -c i...
import numpy as np A, B, M = map(int,input().split()) a = np.array([int(num) for num in input().split()]) a_min = np.min(a) b = np.array([int(num) for num in input().split()]) b_min = np.min(b) total_min= a_min + b_min for i in range(0, M): x, y, c = map(int,input().split()) min_can = a[x-1] + b[y-1] -c i...
[ "assignment.variable.change", "identifier.change" ]
527,184
527,185
u232873434
python
p02748
import numpy as np A, B, M = map(int,input().split()) a = np.array([int(num) for num in input().split()]) a_min = np.min(a) b = np.array([int(num) for num in input().split()]) b_min = np.min(b) total_min= a_min + b_min for i in range(0, M): x, y, c = map(int,input().split()) min_can = a[x-1] + b[y-1] -c if...
import numpy as np A, B, M = map(int,input().split()) a = np.array([int(num) for num in input().split()]) a_min = np.min(a) b = np.array([int(num) for num in input().split()]) b_min = np.min(b) total_min= a_min + b_min for i in range(0, M): x, y, c = map(int,input().split()) min_can = a[x-1] + b[y-1] -c i...
[ "assignment.variable.change", "identifier.change", "call.arguments.change", "io.output.change" ]
527,186
527,185
u232873434
python
p02748
A, B, M = [int(i) for i in input().split()] a_i = [int(i) for i in input().split()] b_i = [int(i) for i in input().split()] m_i = [[int(j) for j in input().split()] for i in range(M)] min_v = 10^5 for m in m_i: v = a_i[m[0]-1] + b_i[m[1]-1] - m[2] if v < min_v: min_v = v min_pair = min(a_i) + min(b_...
A, B, M = [int(i) for i in input().split()] a_i = [int(i) for i in input().split()] b_i = [int(i) for i in input().split()] m_i = [[int(j) for j in input().split()] for i in range(M)] min_v = 10**6 for m in m_i: v = a_i[m[0]-1] + b_i[m[1]-1] - m[2] if v < min_v: min_v = v min_pair = min(a_i) + min(b...
[]
527,191
527,192
u516589098
python
p02748
a,b,m=map(int,input().split()) A=list(map(int,input().split())) B=list(map(int,input().split())) lst=[] for i in range(m): x,y,c=map(int,input().split()) lst.append([x,y,c]) v=min(A)+min(B) for i in range(m): V=a[A[i][0]-1]+B[lst[i][1]-1]-lst[i][2] if v>V: v=V print(v)
a,b,m=map(int,input().split()) A=list(map(int,input().split())) B=list(map(int,input().split())) lst=[] for i in range(m): x,y,c=map(int,input().split()) lst.append([x,y,c]) v=min(A)+min(B) for i in range(m): V=A[lst[i][0]-1]+B[lst[i][1]-1]-lst[i][2] if v>V: v=V print(v)
[]
527,203
527,204
u527261492
python
p02748
a, b, m = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, input().split())) aa = sorted(a) bb = sorted(b) lis = [] mi = 10**12 for i in range(m): x, y, c = map(int, input().split()) s = a[x-1]+b[y-1]-c mi = min(s, mi) mii = a[0]+b[0] ans = min(mii,mi) print(ans)
a, b, m = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, input().split())) aa = sorted(a) bb = sorted(b) lis = [] mi = 10**12 for i in range(m): x, y, c = map(int, input().split()) s = a[x-1]+b[y-1]-c mi = min(s, mi) mii = aa[0]+bb[0] ans = min(mii,mi) print(ans)
[ "assignment.value.change", "identifier.change", "expression.operation.binary.change" ]
527,215
527,216
u720636500
python
p02748
A,B,M = map(int,input().split()) a = list(map(int,input().split())) b = list(map(int,input().split())) discount = [] for i in [0]*M: discount.append(list(map(int,input().split()))) min_comb = min(a)+min(b) for i in range(M): min_comb = min(min_comb,a[discount[i][0]-1]+b[discount[i][1]-1]-discount[i][2]) ans...
A,B,M = map(int,input().split()) a = list(map(int,input().split())) b = list(map(int,input().split())) discount = [] for i in [0]*M: discount.append(list(map(int,input().split()))) min_comb = min(a)+min(b) for i in range(M): min_comb = min(min_comb,a[discount[i][0]-1]+b[discount[i][1]-1]-discount[i][2]) ans...
[ "assignment.value.change", "identifier.replace.add", "literal.replace.remove" ]
527,223
527,224
u690184681
python
p02748
A, B, M = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, input().split())) xyc = [tuple(map(int, input().split())) for _ in range(M)] minP = min(a) + min(b) for x, y, c in xyc: minP = min(a[x-1]+b[x-1]-c, minP) print(minP)
A, B, M = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, input().split())) xyc = [tuple(map(int, input().split())) for _ in range(M)] minP = min(a) + min(b) for x, y, c in xyc: minP = min(a[x-1]+b[y-1]-c, minP) print(minP)
[ "assignment.value.change", "identifier.change", "variable_access.subscript.index.change", "call.arguments.change", "expression.operation.binary.change" ]
527,227
527,228
u384793271
python
p02748
A,B,M = map(int,input().split()) a = list(map(int,input().split())) b = list(map(int,input().split())) x = [0] * M y = [0] * M c = [0] * M for i in range(M): x[i], y[i], c[i] = map(int, input().split()) ans= 0 tmp =0 #割引券を使わない場合 ans = min(a) + min(b) #割引券を使う場合 for i in range(M): if a[x[i]-1] + b[y[i]-1] - c[...
A,B,M = map(int,input().split()) a = list(map(int,input().split())) b = list(map(int,input().split())) x = [0] * M y = [0] * M c = [0] * M for i in range(M): x[i], y[i], c[i] = map(int, input().split()) ans= 0 tmp =0 #割引券を使わない場合 ans = min(a) + min(b) #割引券を使う場合 for i in range(M): if a[x[i]-1] + b[y[i]-1] - c[...
[ "assignment.change" ]
527,262
527,263
u250207413
python
p02748
a,b,m=map(int, input().split()) A=list(map(int, input().split())) B=list(map(int, input().split())) buf=min(A)+min(B) for i in range(m): x,y,c=map(int, input().split()) cp=A[x-1]+B[y-1]-c if buf>=cp: buf==cp print(buf)
a,b,m=map(int, input().split()) A=list(map(int, input().split())) B=list(map(int, input().split())) buf=min(A)+min(B) for i in range(m): x,y,c=map(int, input().split()) cp=A[x-1]+B[y-1]-c if buf>=cp: buf=cp print(buf)
[ "expression.operation.compare.replace.remove", "assignment.replace.add", "misc.typo" ]
527,270
527,271
u993310962
python
p02748
na,nb,M=map(int, input().split()) A = list(map(int, input().split())) B = list(map(int, input().split())) C = [[0 for i in range(3)] for j in range(M)] #C = [[0]*3]*M s=min(A)+min(B) t=0 #print(A) #print(B) for i in range(M): C[i][0],C[i][1],C[i][2] = map(int, input().split()) #print(C) for j in range(M): print(j...
na,nb,M=map(int, input().split()) A = list(map(int, input().split())) B = list(map(int, input().split())) C = [[0 for i in range(3)] for j in range(M)] #C = [[0]*3]*M s=min(A)+min(B) t=0 #print(A) #print(B) for i in range(M): C[i][0],C[i][1],C[i][2] = map(int, input().split()) #print(C) for j in range(M): #print(...
[ "call.remove" ]
527,280
527,281
u052821962
python
p02748
A, B, M = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, input().split())) value = min(a) + min(b) for i in range(M): x,y,c = list(map(int, input().split())) if A[x-1] + B[y-1] - c < value: value = A[x-1] + B[y-1] - c print(value)
A, B, M = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, input().split())) value = min(a) + min(b) for i in range(M): x,y,c = list(map(int, input().split())) if a[x-1] + b[y-1] - c < value: value = a[x-1] + b[y-1] - c print(value)
[ "identifier.change", "control_flow.branch.if.condition.change", "assignment.value.change", "expression.operation.binary.change" ]
527,282
527,283
u557565572
python
p02748
a,b,m=map(int,input().split()) al=list(map(int,input().split())) bl=list(map(int,input().split())) tmp=99999999 for i in range(m): x,y,c=[int(i) for i in input().split()] cost=al[x-1]+bl[y-1]-c #各クーポンを使った時の金額 tmp=min(tmp,cost) k=(min(al)+min(bl)) #割引券を使わなかった時の最小値 print(min(k,cost))
a,b,m=map(int,input().split()) al=list(map(int,input().split())) bl=list(map(int,input().split())) tmp=99999999 for i in range(m): x,y,c=[int(i) for i in input().split()] cost = al[x-1] + bl[y-1] - c #各割引券を使った時の金額 tmp=min(tmp,cost) k=(min(al)+min(bl)) #割引券を使わなかった時の最小値 print(min(k,tmp))
[ "identifier.change", "call.arguments.change", "io.output.change" ]
527,295
527,296
u553070631
python
p02748
a,b,m=map(int,input().split()) al=list(map(int,input().split())) bl=list(map(int,input().split())) tmp=0 for i in range(m): x,y,c=[int(i) for i in input().split()] cost=al[x-1]+bl[y-1]-c #各クーポンを使った時の金額 tmp=min(tmp,cost) k=(min(al)+min(bl)) #割引券を使わなかった時の最小値 print(min(k,cost))
a,b,m=map(int,input().split()) al=list(map(int,input().split())) bl=list(map(int,input().split())) tmp=99999999 for i in range(m): x,y,c=[int(i) for i in input().split()] cost = al[x-1] + bl[y-1] - c #各割引券を使った時の金額 tmp=min(tmp,cost) k=(min(al)+min(bl)) #割引券を使わなかった時の最小値 print(min(k,tmp))
[ "literal.number.integer.change", "assignment.value.change", "identifier.change", "call.arguments.change", "io.output.change" ]
527,297
527,296
u553070631
python
p02748
a,b,m=map(int,input().split()) *a,=map(int,input().split()) *b,=map(int,input().split()) mi=10**9 for i in range(m): x,y,c=map(int,input().split()) if len(a)<=x and len(b)<=y: res=a[x-1]+b[y-1]-c mi=min(mi,res) l=min(a)+min(b) print(min(mi,l))
a,b,m=map(int,input().split()) *a,=map(int,input().split()) *b,=map(int,input().split()) ans=10**9 for i in range(m): x,y,c=map(int,input().split()) if len(a)>=x and len(b)>=y: res=a[x-1]+b[y-1]-c ans=min(ans,res) l=min(a)+min(b) print(min(ans,l))
[ "assignment.variable.change", "identifier.change", "misc.opposites", "expression.operator.compare.change", "control_flow.branch.if.condition.change", "assignment.value.change", "call.arguments.change", "io.output.change" ]
527,298
527,299
u857070771
python
p02748
A, B, M = map(int,input().split()) a = list(map(int,input().split())) b = list(map(int,input().split())) min_cost = min(a) + min(b) for i in range(M): x = list(map(int,input().split())) cost = a[x[0]] + b[x[1]] - x[2] if min_cost > cost: min_cost = cost print(min_cost)
A, B, M = map(int,input().split()) a = list(map(int,input().split())) b = list(map(int,input().split())) min_cost = min(a) + min(b) for i in range(M): x = list(map(int,input().split())) cost = a[x[0] - 1] + b[x[1] - 1] - x[2] if min_cost > cost: min_cost = cost print(min_cost)
[ "assignment.change" ]
527,312
527,313
u001839988
python
p02748
AC, BC, MC = map(int, input().split()) A = list(map(int, input().split())) B = list(map(int, input().split())) M = [tuple(map(int, input().split())) for _ in range(MC)] ans = min(A) + min(B) for x, y, c in M: ans = min(ans, A[x - 1] + B[x - 1] - c) print(ans)
AC, BC, MC = map(int, input().split()) A = list(map(int, input().split())) B = list(map(int, input().split())) M = [tuple(map(int, input().split())) for _ in range(MC)] ans = min(A) + min(B) for x, y, c in M: ans = min(ans, A[x - 1] + B[y - 1] - c) print(ans)
[ "assignment.value.change", "identifier.change", "variable_access.subscript.index.change", "call.arguments.change", "expression.operation.binary.change" ]
527,314
527,315
u640319601
python
p02748
a,b,m = map(int,input().split()) A = list(map(int,input().split())) B = list(map(int,input().split())) xyc = [list(map(int,input().split())) for _ in range(m)] price = min(A)+min(B) for x,y,c in xyc: k = A[x-1] + B[y-1] - c print(k) if k < price: price = k print(price)
a,b,m = map(int,input().split()) A = list(map(int,input().split())) B = list(map(int,input().split())) xyc = [list(map(int,input().split())) for _ in range(m)] price = min(A)+min(B) for x,y,c in xyc: k = A[x-1] + B[y-1] - c if k < price: price = k print(price)
[ "call.remove" ]
527,322
527,323
u559196406
python
p02748
a,b,m = map(int,input().split()) A = list(map(int,input().split())) B = list(map(int,input().split())) xyc = [list(map(int,input().split())) for _ in range(m)] price = min(A)+min(B) for x,y,c in xyc: k = A[x-1] + B[y-1] - c if k < price: price = k print(k)
a,b,m = map(int,input().split()) A = list(map(int,input().split())) B = list(map(int,input().split())) xyc = [list(map(int,input().split())) for _ in range(m)] price = min(A)+min(B) for x,y,c in xyc: k = A[x-1] + B[y-1] - c if k < price: price = k print(price)
[ "identifier.change", "call.arguments.change", "io.output.change" ]
527,324
527,323
u559196406
python
p02748
A, B, M = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, input().split())) x = [0]*M y = [0]*M c = [0]*M ans = a[0]+b[0] for i in range(M): x[i], y[i], c[i] = map(int, input().split()) if a[x[i]-1] + b[y[i]-1] - c[i] < ans: ans = a[x[i]-1] + b[y[i]-1] - c[i] print(ans...
A, B, M = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, input().split())) x = [0]*M y = [0]*M c = [0]*M ans = sorted(a)[0]+sorted(b)[0] for i in range(M): x[i], y[i], c[i] = map(int, input().split()) if a[x[i]-1] + b[y[i]-1] - c[i] < ans: ans = a[x[i]-1] + b[y[i]-1] -...
[ "call.add", "call.arguments.change" ]
527,329
527,330
u578462133
python
p02748
#!/usr/bin/env python # coding: utf-8 def ri(): return int(input()) def rl(): return list(input().split()) def rli(): return list(map(int, input().split())) def main(): a, b, m = rli() la = rli() lb = rli() ans = min(la)+min(lb) for i in range(m): x, y, c = rli() x -=...
#!/usr/bin/env python # coding: utf-8 def ri(): return int(input()) def rl(): return list(input().split()) def rli(): return list(map(int, input().split())) def main(): a, b, m = rli() la = rli() lb = rli() ans = min(la)+min(lb) for i in range(m): x, y, c = rli() x -=...
[ "assignment.value.change", "identifier.change", "variable_access.subscript.index.change", "call.arguments.change", "expression.operation.binary.change" ]
527,333
527,334
u537905693
python
p02748
from heapq import heappush, heappop, heapify from collections import deque, defaultdict, Counter import itertools from itertools import permutations, combinations, accumulate import sys import bisect import string import math import time def I(): return int(input()) def S(): return input() def MI(): return map(in...
from heapq import heappush, heappop, heapify from collections import deque, defaultdict, Counter import itertools from itertools import permutations, combinations, accumulate import sys import bisect import string import math import time def I(): return int(input()) def S(): return input() def MI(): return map(in...
[ "assignment.value.change", "identifier.change" ]
527,337
527,338
u642874916
python
p02748
# encoding:utf-8 import copy import random import bisect #bisect_left これで二部探索の大小検索が行える import fractions #最小公倍数などはこっち import math import sys import collections mod = 10**9+7 sys.setrecursionlimit(mod) # 再帰回数上限はでdefault1000 d = collections.deque() def LI(): return list(map(int, sys.stdin.readline().split())) A, B, M =...
# encoding:utf-8 import copy import random import bisect #bisect_left これで二部探索の大小検索が行える import fractions #最小公倍数などはこっち import math import sys import collections mod = 10**9+7 sys.setrecursionlimit(mod) # 再帰回数上限はでdefault1000 d = collections.deque() def LI(): return list(map(int, sys.stdin.readline().split())) A, B, M =...
[ "assignment.value.change", "identifier.change", "call.arguments.change", "expression.operation.binary.change" ]
527,345
527,346
u059210959
python
p02748
a,b,m=map(int,input().split()) al=list(map(int,input().split())) bl=list(map(int,input().split())) x=min(al)+min(bl) for i in range(m): x,y,c=map(int,input().split()) t=al[x-1]+bl[y-1]-c x=min(x,t) print(x)
a,b,m=map(int,input().split()) al=list(map(int,input().split())) bl=list(map(int,input().split())) z=min(al)+min(bl) for i in range(m): x,y,c=map(int,input().split()) t=al[x-1]+bl[y-1]-c z=min(z,t) print(z)
[ "assignment.variable.change", "identifier.change", "assignment.value.change", "call.arguments.change", "io.output.change" ]
527,347
527,348
u539517139
python
p02748
a,b,m=map(int,input().split()) al=list(map(int,input().split())) bl=list(map(int,input().split())) x=min(al)+min(bl) for i in range(m): x,y,c=map(int,input().split()) t=a[x-1]+b[y-1]-c x=min(x,t) print(x)
a,b,m=map(int,input().split()) al=list(map(int,input().split())) bl=list(map(int,input().split())) z=min(al)+min(bl) for i in range(m): x,y,c=map(int,input().split()) t=al[x-1]+bl[y-1]-c z=min(z,t) print(z)
[ "assignment.variable.change", "identifier.change", "assignment.value.change", "expression.operation.binary.change", "call.arguments.change", "io.output.change" ]
527,349
527,348
u539517139
python
p02748
A, B, M = [int(i) for i in input().split()] a = [int(i) for i in input().split()] b = [int(i) for i in input().split()] mina, minb = min(a), min(b) minv = mina+minb for _ in range(M): x, y, c = [int(i) for i in input().split()] x -= 1 y -= 1 minv = min(minv, a[x]+a[y]-c) print(minv)
A, B, M = [int(i) for i in input().split()] a = [int(i) for i in input().split()] b = [int(i) for i in input().split()] mina, minb = min(a), min(b) minv = mina+minb for _ in range(M): x, y, c = [int(i) for i in input().split()] x -= 1 y -= 1 minv = min(minv, a[x]+b[y]-c) print(minv)
[ "assignment.value.change", "identifier.change", "call.arguments.change", "expression.operation.binary.change" ]
527,356
527,357
u821432765
python
p02748
A,B,M=map(int,input().split()) a=list(map(int,input().split())) b=list(map(int,input().split())) xyc=[list(map(int,input().split())) for i in range(M)] noti=min(a)+min(b) ans=0 c=0 for i in range(M): c=a[xyc[i][0]-1] + b[xyc[i][1]-1] -xyc[i][2] ans=min(noti,c) print(ans)
A,B,M=map(int,input().split()) a=list(map(int,input().split())) b=list(map(int,input().split())) xyc=[list(map(int,input().split())) for i in range(M)] noti=min(a)+min(b) ans=noti c=0 for i in range(M): c=a[xyc[i][0]-1] + b[xyc[i][1]-1] -xyc[i][2] ans=min(ans,c) print(ans)
[ "assignment.value.change", "identifier.replace.add", "literal.replace.remove", "identifier.change", "call.arguments.change" ]
527,364
527,365
u895408600
python
p02748
a,b,m=map(int,input().split()) A=list(map(int,input().split())) B=list(map(int,input().split())) ans=min(A)+min(B) for i in range(m): x,y,c=map(int,input().split()) tmp=A[x-1]+B[y-1]+c ans=min(ans,tmp) print(ans)
a,b,m=map(int,input().split()) A=list(map(int,input().split())) B=list(map(int,input().split())) ans=min(A)+min(B) for i in range(m): x,y,c=map(int,input().split()) tmp=A[x-1]+B[y-1]-c ans=min(ans,tmp) print(ans)
[ "misc.opposites", "expression.operator.arithmetic.change", "assignment.value.change", "expression.operation.binary.change" ]
527,388
527,389
u371409687
python
p02748
A, B, M = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, input().split())) amin = min(a) bmin = min(b) ans = amin + bmin for i in range(M): x, y, c = map(int, input().split()) ans = min( ans , a[x-1] + b[x-1] - c ) print(ans)
A, B, M = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, input().split())) amin = min(a) bmin = min(b) ans = amin + bmin for i in range(M): x, y, c = map(int, input().split()) ans = min( ans , a[x-1] + b[y-1] - c ) print(ans)
[ "assignment.value.change", "identifier.change", "variable_access.subscript.index.change", "call.arguments.change", "expression.operation.binary.change" ]
527,398
527,399
u906651641
python
p02748
a, b, m = map(int, input().split()) A = list(map(int, input().split())) B = list(map(int, input().split())) XYC = [list(map(int, input().split())) for _ in range(m)] mn = min(A) + min(B) for x, y, c in XYC: mn = min(mn, A[x - 1] + B[x - 1] - c) print(mn)
a, b, m = map(int, input().split()) A = list(map(int, input().split())) B = list(map(int, input().split())) XYC = [list(map(int, input().split())) for _ in range(m)] mn = min(A) + min(B) for x, y, c in XYC: mn = min(mn, A[x - 1] + B[y - 1] - c) print(mn)
[ "assignment.value.change", "identifier.change", "variable_access.subscript.index.change", "call.arguments.change", "expression.operation.binary.change" ]
527,426
527,427
u377989038
python
p02748
def main(): a_n, b_n, m = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, input().split())) ans = 10**8 for _ in range(m): x, y, c = map(int, input().split()) x -= 1 y -= 1 buf = a[x] + b[x] - c if buf < ans: ans = b...
def main(): a_n, b_n, m = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, input().split())) ans = 10**8 for _ in range(m): x, y, c = map(int, input().split()) x -= 1 y -= 1 buf = a[x] + b[y] - c if buf < ans: ans = b...
[ "assignment.value.change", "identifier.change", "variable_access.subscript.index.change", "expression.operation.binary.change" ]
527,428
527,429
u071680334
python
p02748
a,b,m = map(int,input().split()) ref = list(map(int,input().split())) mic = list(map(int,input().split())) ans = min(ref)+min(mic) for i in range(m): x,y,c = map(int,input().split()) x-=1 y-=1 if ref[x]+ref[y]-c < ans: ans = ref[x]+ref[y]-c print(ans)
a,b,m = map(int,input().split()) ref = list(map(int,input().split())) mic = list(map(int,input().split())) ans = min(ref)+min(mic) for i in range(m): x,y,c = map(int,input().split()) x-=1 y-=1 if ref[x]+mic[y]-c < ans: ans = ref[x]+mic[y]-c print(ans)
[ "identifier.change", "control_flow.branch.if.condition.change", "assignment.value.change", "expression.operation.binary.change" ]
527,434
527,435
u231685196
python
p02748
A, B, M = map(int, input().split()) a = [int(x) for x in input().split()] b = [int(x) for x in input().split()] ans = min(a)+min(b) for i in range(M): x,y,c = map(int, input().split()) ans = min(ans,a[x-1]+b[x-1]-c) print(ans)
A, B, M = map(int, input().split()) a = [int(x) for x in input().split()] b = [int(x) for x in input().split()] ans = min(a)+min(b) for i in range(M): x, y, c = map(int, input().split()) ans = min(ans, a[x-1]+b[y-1]-c) print(ans)
[ "assignment.value.change", "identifier.change", "variable_access.subscript.index.change", "call.arguments.change", "expression.operation.binary.change" ]
527,436
527,437
u906428167
python
p02748
A, B, M = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, input().split())) ans = min(a) + min(b) for i in range(M): x, y, c = map(int, input().split()) ans = min(ans, a[x-1] + a[y-1] - c) print(ans)
A, B, M = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, input().split())) ans = min(a) + min(b) for i in range(M): x, y, c = map(int, input().split()) ans = min(ans, a[x-1] + b[y-1] - c) print(ans)
[ "assignment.value.change", "identifier.change", "call.arguments.change", "expression.operation.binary.change" ]
527,442
527,443
u728120584
python
p02748
a,b,m=map(int,input().split()) ai=list(map(int, input().split())) bi=list(map(int, input().split())) sm=[list(map(int, input().split())) for _ in range(m)] k=min(ai)+min(bi) for x in range(m): l=ai[sm[x][0]-1]+bi[sm[x][1]-1]-sm[x][2] ans=min(k,l) print(ans)
a,b,m=map(int,input().split()) ai=list(map(int, input().split())) bi=list(map(int, input().split())) sm=[list(map(int, input().split())) for _ in range(m)] k=min(ai)+min(bi) for x in range(m): l=ai[sm[x][0]-1]+bi[sm[x][1]-1]-sm[x][2] k=min(k,l) print(k)
[ "assignment.variable.change", "identifier.change", "call.arguments.change", "io.output.change" ]
527,484
527,485
u548069143
python
p02748
A,B,M = map(int,input().split(" ")) a = list(map(int,input().split(" "))) b = list(map(int,input().split(" "))) tmp = min(a) + min(b) for i in range(M): x,y,c = map(int,input().split(" ")) sum1 = a[x-1]+b[y-1]-c ans = min(tmp,sum1) print(ans)
A,B,M = map(int,input().split(" ")) a = list(map(int,input().split(" "))) b = list(map(int,input().split(" "))) ans = min(a) + min(b) for i in range(M): x,y,c = map(int,input().split(" ")) tmp = a[x-1]+b[y-1]-c ans = min(tmp,ans) print(ans)
[ "assignment.variable.change", "identifier.change", "assignment.value.change", "call.arguments.change" ]
527,499
527,500
u860234244
python
p02748
def main(): A,B,M = map(int,input().split()) val_a = [int(i) for i in input().split()] val_b = [int(j) for j in input().split()] lucky = [map(int,input().split()) for _ in range(M)] min_a = min(val_a) min_b = min(val_b) ans = min_a + min_b for i in range(M): a,b,c = lucky[i] ...
def main(): A,B,M = map(int,input().split()) val_a = [int(i) for i in input().split()] val_b = [int(j) for j in input().split()] lucky = [map(int,input().split()) for _ in range(M)] min_a = min(val_a) min_b = min(val_b) ans = min_a + min_b for i in range(M): a,b,c = lucky[i] ...
[ "identifier.change", "call.arguments.change", "io.output.change" ]
527,503
527,504
u498620941
python
p02748
A, B, M = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, input().split())) min = min(a) + min(b) for i in range(M): x, y, c = list(map(int, input().split())) tmp = a[x - 1] + b[y - 1] + c if min > tmp: min = tmp print(min)
A, B, M = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, input().split())) min = min(a) + min(b) for i in range(M): x, y, c = list(map(int, input().split())) tmp = a[x - 1] + b[y - 1] - c if min > tmp: min = tmp print(min)
[ "misc.opposites", "expression.operator.arithmetic.change", "assignment.value.change", "expression.operation.binary.change" ]
527,518
527,519
u766566560
python
p02748
A, B, M = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, input().split())) x = [0] * M y = [0] * M c = [0] * M for i in range(M): x[i], y[i], c[i] = map(int, input().split()) min_cost = min(a) + min(b) for i in range(M): min_cost = min(a[x[i]-1] + b[x[i]-1] - c[i], min_cost) ...
A, B, M = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, input().split())) x = [0] * M y = [0] * M c = [0] * M for i in range(M): x[i], y[i], c[i] = map(int, input().split()) min_cost = min(a) + min(b) for i in range(M): min_cost = min(a[x[i]-1] + b[y[i]-1] - c[i], min_cost) prin...
[ "assignment.value.change", "identifier.change", "variable_access.subscript.index.change", "call.arguments.change", "expression.operation.binary.change" ]
527,525
527,526
u700705777
python
p02748
A, B, M = [int(n) for n in input().split()] a = [int(n) for n in input().split()] b = [int(n) for n in input().split()] ma = sorted(a)[0] mb = sorted(b)[0] XY = {} ans = 10**5+1 for m in range(M): x, y, c = [int(n) for n in input().split()] dv = a[x-1] + b[y-1] - c mv = min((ma+mb), dv) if ans > mv: ...
A, B, M = [int(n) for n in input().split()] a = [int(n) for n in input().split()] b = [int(n) for n in input().split()] ma = sorted(a)[0] mb = sorted(b)[0] XY = {} ans = ma + mb for m in range(M): x, y, c = [int(n) for n in input().split()] dv = a[x-1] + b[y-1] - c mv = min((ma+mb), dv) if ans > mv: ...
[ "assignment.value.change", "identifier.replace.add", "literal.replace.remove", "expression.operation.binary.change", "expression.operation.binary.remove" ]
527,527
527,528
u761087127
python
p02748
def resolve(): input = sys.stdin.readline A, B, M = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, input().split())) grid=[list(map(int,input().split())) for i in range(M)] res = min(a) + min(b) for x, y, c in grid: res = min(res, a[x-1]+b[y-1]-c) ...
import sys def resolve(): input = sys.stdin.readline A, B, M = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, input().split())) grid=[list(map(int,input().split())) for i in range(M)] res = min(a) + min(b) for x, y, c in grid: res = min(res, a[x-1]...
[]
527,529
527,530
u922172470
python
p02748
import sys input = sys.stdin.readline A,B,m = map(int,input().split()) a = list(map(int,input().split())) b = list(map(int,input().split())) ans = min(a) + min(b) for i in range(m): sum = 0 x,y,c = map(int,input().split()) sum = a[x] + b[y] - c ans = min(ans,sum) print(ans)
import sys input = sys.stdin.readline A,B,m = map(int,input().split()) a = list(map(int,input().split())) b = list(map(int,input().split())) ans = min(a) + min(b) for i in range(m): sum = 0 x,y,c = map(int,input().split()) sum = a[x-1] + b[y-1] - c ans = min(ans,sum) print(ans)
[ "assignment.change" ]
527,539
527,540
u041382530
python
p02748
# coding: utf-8 # Your code here! x, y, m = [int(i) for i in input().split()] a = [int(i) for i in input().split()] b = [int(i) for i in input().split()] num = [min(a)+min(b)] for _ in range(m): tmp = [int(i) for i in input().split()] num.append(a[tmp[0]]-1+b[tmp[1]]-1-tmp[2]) print(min(num))
# coding: utf-8 # Your code here! x, y, m = [int(i) for i in input().split()] a = [int(i) for i in input().split()] b = [int(i) for i in input().split()] num = [min(a)+min(b)] for _ in range(m): tmp = [int(i) for i in input().split()] num.append(a[tmp[0]-1]+b[tmp[1]-1]-tmp[2]) print(min(num))
[ "call.arguments.change" ]
527,541
527,542
u952968889
python
p02748
A, B, M = map(int, input().split()) a = [int(x) for x in input().split()] b = [int(x) for x in input().split()] result = min(a) + min(b) for i in range(M): x, y, c = map(int, input().split()) sum = a[x] + b[y] - c if sum < result: result = sum print(result)
A, B, M = map(int, input().split()) a = [int(x) for x in input().split()] b = [int(x) for x in input().split()] result = min(a) + min(b) for i in range(M): x, y, c = map(int, input().split()) sum = a[x-1] + b[y-1] - c if sum < result: result = sum print(result)
[ "assignment.change" ]
527,558
527,559
u837340160
python
p02748
data = input().split(" ") A = input().split(" ") B = input().split(" ") total = 0 a = 0 b = 0 j = 0 for i in data: data[j] = int(i) j += 1 j = 0 for i in A: A[j] = int(i) j += 1 j = 0 for i in B: B[j] = int(i) j += 1 for i in range(data[2]): data1 = input().split() j = 0 for i in d...
data = input().split(" ") A = input().split(" ") B = input().split(" ") total = 1000000 a = 1000000 b = 1000000 j = 0 for i in data: data[j] = int(i) j += 1 j = 0 for i in A: A[j] = int(i) j += 1 j = 0 for i in B: B[j] = int(i) j += 1 for i in range(data[2]): data1 = input().split() j ...
[ "literal.number.integer.change", "assignment.value.change" ]
527,562
527,563
u797421335
python
p02748
data = input().split(" ") A = input().split(" ") B = input().split(" ") total = 100000 a = 100000 b = 100000 j = 0 for i in data: data[j] = int(i) j += 1 j = 0 for i in A: A[j] = int(i) j += 1 j = 0 for i in B: B[j] = int(i) j += 1 for i in range(data[2]): data1 = input().split() j = 0...
data = input().split(" ") A = input().split(" ") B = input().split(" ") total = 1000000 a = 1000000 b = 1000000 j = 0 for i in data: data[j] = int(i) j += 1 j = 0 for i in A: A[j] = int(i) j += 1 j = 0 for i in B: B[j] = int(i) j += 1 for i in range(data[2]): data1 = input().split() j ...
[ "literal.number.integer.change", "assignment.value.change", "identifier.change", "variable_access.subscript.index.change", "expression.operation.binary.change" ]
527,564
527,563
u797421335
python
p02748
a,b,m = input().split() a = int(a) b = int(b) m = int(m) al = input().split() bl = input().split() ml = [list(map(int, input().split())) for i in range(m)] al = list(map(int, al)) bl = list(map(int, bl)) al = sorted(al) bl = sorted(bl) tmp = al[0] + bl[0] comp = 0 fp = tmp for i in ml: comp = al[i[0]-1] + bl[i[1...
a,b,m = input().split() a = int(a) b = int(b) m = int(m) al = input().split() bl = input().split() ml = [list(map(int, input().split())) for i in range(m)] al = list(map(int, al)) bl = list(map(int, bl)) als = sorted(al) bls = sorted(bl) tmp = als[0] + bls[0] comp = 0 fp = tmp for i in ml: comp = al[i[0]-1] + bl...
[ "assignment.variable.change", "identifier.change", "assignment.value.change", "expression.operation.binary.change" ]
527,565
527,566
u045235021
python
p02748
A, B, M = map(int,input().split()) a = list(map(int,input().split())) b = list(map(int,input().split())) price1 = min(a) + min(b) for _ in range(M): x, y, c = map(int,input().split()) price2 = a[x-1] + a[y-1] - c if price1 > price2: price1 = price2 print(price1)
A, B, M = map(int,input().split()) a = list(map(int,input().split())) b = list(map(int,input().split())) price1 = min(a) + min(b) for _ in range(M): x, y, c = map(int,input().split()) price2 = a[x-1] + b[y-1] - c if price1 > price2: price1 = price2 print(price1)
[ "assignment.value.change", "identifier.change", "expression.operation.binary.change" ]
527,571
527,572
u661977789
python
p02748
A, B, M = map(int,input().split()) a = list(map(int,input().split())) b = list(map(int,input().split())) price1 = min(a) + min(b) for _ in range(M): x, y, c = map(int,input().split()) price2 = a[x-1] + a[y-2] - c if price1 > price2: price1 = price2 print(price1)
A, B, M = map(int,input().split()) a = list(map(int,input().split())) b = list(map(int,input().split())) price1 = min(a) + min(b) for _ in range(M): x, y, c = map(int,input().split()) price2 = a[x-1] + b[y-1] - c if price1 > price2: price1 = price2 print(price1)
[ "assignment.value.change", "identifier.change", "expression.operation.binary.change", "literal.number.integer.change", "variable_access.subscript.index.change" ]
527,573
527,572
u661977789
python
p02748
A, B, M = map(int,input().split()) a = list(map(int,input().split())) b = list(map(int,input().split())) minimum = a[0]+b[0] for k in range(M): x,y,c = map(int,input().split()) tmp = a[x-1]+a[y-1]-c if minimum > tmp: minimum = tmp a.sort() b.sort() for i in a: if i + b[0] > minimum: b...
A, B, M = map(int,input().split()) a = list(map(int,input().split())) b = list(map(int,input().split())) minimum = a[0]+b[0] for k in range(M): x,y,c = map(int,input().split()) tmp = a[x-1]+b[y-1]-c if minimum > tmp: minimum = tmp a.sort() b.sort() for i in a: if i + b[0] > minimum: b...
[ "assignment.value.change", "identifier.change", "expression.operation.binary.change" ]
527,581
527,582
u749007763
python
p02748
# -*- coding: utf-8 -*- A,B,M = list(map(int,input().split())) a = list(map(int,input().split())) b = list(map(int,input().split())) mini = min(a)+ min(b) def check(Mlist, mini): if mini > a[Mlist[0]-1]+b[Mlist[1]-1]-Mlist[2]: return a[Mlist[0]-1]+b[Mlist[1]-1]-Mlist[2] for i in range(M): mini = chec...
# -*- coding: utf-8 -*- A,B,M = list(map(int,input().split())) a = list(map(int,input().split())) b = list(map(int,input().split())) mini = min(a)+ min(b) def check(Mlist, mini): #print(Mlist) if mini > a[Mlist[0]-1]+b[Mlist[1]-1]-Mlist[2]: return a[Mlist[0]-1]+b[Mlist[1]-1]-Mlist[2] return mini ...
[ "control_flow.return.add" ]
527,596
527,597
u657786757
python
p02748
A,B,M = map(int,input().split()) A_ = list(map(int,input().split())) B_ = list(map(int,input().split())) mini =min(A_) + min(B_) for i in range(M): array = list(map(int,input().split())) m = A_[array[0]-1] + B_[array[0]-1] -array[2] if(mini > m): mini = m print(mini)
A,B,M = map(int,input().split()) A_ = list(map(int,input().split())) B_ = list(map(int,input().split())) mini =min(A_) + min(B_) for i in range(M): array = list(map(int,input().split())) m = A_[array[0]-1] + B_[array[1]-1] -array[2] if(mini > m): mini = m print(mini)
[ "literal.number.integer.change", "assignment.value.change", "variable_access.subscript.index.change", "expression.operation.binary.change" ]
527,600
527,601
u803865203
python
p02748
aa, bb, m = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, input().split())) couponMin = float("INF") for i in range(m): x, y, c = map(int, input().split()) cc = a[x - 1] + b[x - 1] - c couponMin = min(couponMin, cc) print(min(min(a) + min(b), couponMin))
aa, bb, m = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, input().split())) couponMin = float("INF") for i in range(m): x, y, c = map(int, input().split()) cc = a[x - 1] + b[y - 1] - c couponMin = min(couponMin, cc) print(min(min(a) + min(b), couponMin))
[ "assignment.value.change", "identifier.change", "variable_access.subscript.index.change", "expression.operation.binary.change" ]
527,604
527,605
u824734140
python
p02748
A, B, M = input().split() A=int(A) B=int(B) M=int(M) a = list(map(int, input().split())) b = list(map(int, input().split())) x = [list(map(int, input().split())) for i in range(M)] dis = [] for i in range(M): m = x[i][0]-1 n = x[i][0]-1 dis.append(a[m] + b[n] - x[i][2]) a.sort() b.sort() dis.append...
A, B, M = input().split() A=int(A) B=int(B) M=int(M) a = list(map(int, input().split())) b = list(map(int, input().split())) x = [list(map(int, input().split())) for i in range(M)] dis = [] for i in range(M): m = x[i][0]-1 n = x[i][1]-1 dis.append(a[m] + b[n] - x[i][2]) a.sort() b.sort() dis.append...
[ "literal.number.integer.change", "assignment.value.change", "variable_access.subscript.index.change", "expression.operation.binary.change" ]
527,606
527,607
u450147945
python
p02748
A, B, M = input().split() A=int(A) B=int(B) M=int(M) a = list(map(int, input().split())) b = list(map(int, input().split())) x = [list(map(int, input().split())) for i in range(M)] dis = [] for i in range(M): m = x[i][0] n = x[i][0] dis.append(a[m] + b[n] - x[i][2]) a.sort() b.sort() dis.append(a[0]+...
A, B, M = input().split() A=int(A) B=int(B) M=int(M) a = list(map(int, input().split())) b = list(map(int, input().split())) x = [list(map(int, input().split())) for i in range(M)] dis = [] for i in range(M): m = x[i][0]-1 n = x[i][1]-1 dis.append(a[m] + b[n] - x[i][2]) a.sort() b.sort() dis.append...
[ "literal.number.integer.change", "assignment.value.change", "variable_access.subscript.index.change" ]
527,608
527,607
u450147945
python
p02748
R = lambda: tuple(map(int, input().split())) A, B, M = R() a, b = R(), R() d = (R() for _ in range(M)) print(min([min(a) + min(b)] + [a[x - 1] + b[x - 1] - c for x, y, c in d]))
R = lambda: tuple(map(int, input().split())) A, B, M = R() a, b = R(), R() d = (R() for _ in range(M)) print(min([min(a) + min(b)] + [a[x - 1] + b[y - 1] - c for x, y, c in d]))
[ "identifier.change", "variable_access.subscript.index.change", "call.arguments.change", "expression.operation.binary.change", "io.output.change" ]
527,613
527,615
u021019433
python
p02748
a,b,m = map(int,input().split()) A = list(map(int,input().split())) B = list(map(int,input().split())) X = [] Y = [] C = [] total = 2*10**5 for i in range(m): x,y,c = map(int,input().split()) X.append(x) Y.append(y) C.append(c) for i in range(m): result = int(A[int(X[int(i)])-1])+int(B[int(Y[int(i)]...
a,b,m = map(int,input().split()) A = list(map(int,input().split())) B = list(map(int,input().split())) #print(A,B) X = [] Y = [] C = [] total = 2*10**5 for i in range(m): x,y,c = map(int,input().split()) X.append(x) Y.append(y) C.append(c) for i in range(m): result = int(A[int(X[int(i)])-1])+int(B[...
[ "identifier.change", "control_flow.branch.if.condition.change", "call.arguments.change", "io.output.change" ]
527,620
527,621
u101442050
python
p02748
A, B, M = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, input().split())) s = [] s.append(min(a) + min(b)) for i in range(M): x_i, y_i, c_i = map(int, input().split()) minus = a[x_i - 1] + a[y_i - 1] - c_i s.append(minus) print(min(s))
A, B, M = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, input().split())) s = [] s.append(min(a) + min(b)) for i in range(M): x_i, y_i, c_i = map(int, input().split()) minus = a[x_i - 1] + b[y_i - 1] - c_i s.append(minus) print(min(s))
[ "assignment.value.change", "identifier.change", "expression.operation.binary.change" ]
527,624
527,625
u028014940
python
p02746
def solve(A,B,C,D, level): E = 3**level if level == -1: return int(abs(A-C) + abs(B-D)) a,b,c,d = A//E, B//E, C//E, D//E if a != c and b != d: return int(abs(A-C) + abs(B-D)) if a == c and b==d: return solve(A,B,C,D,level-1) if a != c and b==d: A,B,C,D = B,A,D,C...
def solve(A,B,C,D, level): E = 3**level if level == -1: return int(abs(A-C) + abs(B-D)) a,b,c,d = A//E, B//E, C//E, D//E if a != c and b != d: return int(abs(A-C) + abs(B-D)) if a == c and b==d: return solve(A,B,C,D,level-1) if a != c and b==d: A,B,C,D = B,A,D,C...
[ "call.remove" ]
527,735
527,736
u619144316
python
p02746
def solve(A,B,C,D, level): E = 3**level if level == 0: return int(abs(A-C) + abs(B-D)) a,b,c,d = A//E, B//E, C//E, D//E if a != c and b != d: return int(abs(A-C) + abs(B-D)) if a == c and b==d: return solve(A,B,C,D,level-1) if a != c and b==d: A,B,C,D = B,A,D,C ...
def solve(A,B,C,D, level): E = 3**level if level == -1: return int(abs(A-C) + abs(B-D)) a,b,c,d = A//E, B//E, C//E, D//E if a != c and b != d: return int(abs(A-C) + abs(B-D)) if a == c and b==d: return solve(A,B,C,D,level-1) if a != c and b==d: A,B,C,D = B,A,D,C...
[ "control_flow.branch.if.condition.change", "expression.operation.unary.add" ]
527,737
527,736
u619144316
python
p02750
import sys def input(): return sys.stdin.buffer.readline()[:-1] n, T = map(int, input().split()) zero = [] non_zero = [] for _ in range(n): a, b = map(int, input().split()) if a == 0: zero.append(b) else: non_zero.append((a, b)) zero.sort() if not zero: z_cum = [] else: z_cum = [zero[0] + 1] for i in ran...
import sys def input(): return sys.stdin.buffer.readline()[:-1] n, T = map(int, input().split()) zero = [] non_zero = [] for _ in range(n): a, b = map(int, input().split()) if a == 0: zero.append(b) else: non_zero.append((a, b)) zero.sort() if not zero: z_cum = [] else: z_cum = [zero[0] + 1] for i in ran...
[ "call.arguments.change", "expression.operation.binary.change", "control_flow.loop.range.bounds.upper.change", "call.arguments.add", "control_flow.break.remove", "control_flow.continue.add" ]
528,188
528,189
u218843509
python
p02750
import sys readline = sys.stdin.buffer.readline INF = 10**18+3 N, T = map(int, readline().split()) AB = [tuple(map(int, readline().split())) for _ in range(N)] ABzero = [b for a, b in AB if a == 0] ABnonzero = [(a, b) for a, b in AB if a] ABnonzero.sort(key = lambda x: (x[1]-1)/x[0]) dp = [0] for a, b in ABnonzero:...
import sys readline = sys.stdin.buffer.readline INF = 10**18+3 N, T = map(int, readline().split()) AB = [tuple(map(int, readline().split())) for _ in range(N)] ABzero = [b for a, b in AB if a == 0] ABnonzero = [(a, b) for a, b in AB if a] ABnonzero.sort(key = lambda x: (x[1]+1)/x[0]) dp = [0] for a, b in ABnonzero:...
[ "misc.opposites", "expression.operator.arithmetic.change", "call.arguments.change", "expression.operation.binary.change", "call.add" ]
528,248
528,247
u368780724
python
p02753
#Macで実行する時 import sys import os if sys.platform=="darwin": base = os.path.dirname(os.path.abspath(__file__)) name = os.path.normpath(os.path.join(base, '../atcoder/input.txt')) sys.stdin = open(name) l = list(input()) #print(l) set_l = set(l) if len(set_l)==1: print("Yes") else: print("No")
#Macで実行する時 import sys import os if sys.platform=="darwin": base = os.path.dirname(os.path.abspath(__file__)) name = os.path.normpath(os.path.join(base, '../atcoder/input.txt')) sys.stdin = open(name) l = list(input()) #print(l) set_l = set(l) if len(set_l)==1: print("No") else: print("Yes")
[ "literal.string.change", "call.arguments.change", "io.output.change" ]
528,351
528,352
u845937249
python
p02753
print('Yes' if set(input()) == 2 else 'No')
print('Yes' if len(set(input())) == 2 else 'No')
[ "call.add", "call.arguments.change" ]
528,361
528,362
u019685451
python
p02753
s = input().split() x1=s[0][0] x2=s[0][1] x3=s[0][2] flag = False A = 'A' B = 'B' if x1==A and x2==A and x3==A: flag = True elif x1==B and x2==B and x3==B: flag = True else: flag = False if (flag): result = 'Yes' else: result = 'No' print(result)
s = input().split() x1=s[0][0] x2=s[0][1] x3=s[0][2] flag = False A = 'A' B = 'B' if x1==A and x2==A and x3==A: flag = True elif x1==B and x2==B and x3==B: flag = True else: flag = False if (flag): result = 'No' else: result = 'Yes' print(result)
[ "literal.string.change", "assignment.value.change" ]
528,363
528,364
u602500004
python
p02753
import sys input = sys.stdin.readline s=input().rstrip() if len(set(s))>1: print('YES') else: print('NO')
import sys input = sys.stdin.readline s=input().rstrip() if len(set(s))>1: print('Yes') else: print('No')
[ "literal.string.change", "literal.string.case.change", "call.arguments.change", "io.output.change" ]
528,365
528,366
u505564549
python
p02753
S = inpit() ans = 'Yes' if (S == 'AAA') or (S=='BBB'): ans = 'No' print(ans)
S = input() ans = 'Yes' if (S == 'AAA') or (S=='BBB'): ans = 'No' print(ans)
[ "assignment.value.change", "identifier.change", "call.function.change" ]
528,371
528,372
u616542081
python
p02753
l = ['AAA', 'BBB'] if input() in l: print('Yes') else: print('No')
l = ['AAA', 'BBB'] if input() in l: print('No') else: print('Yes')
[ "literal.string.change", "call.arguments.change", "io.output.change" ]
528,375
528,376
u377834804
python
p02753
d=input() if d.count("A")==3 or d.count("B")==3: print("Yes") else: print("No")
d=input() if d.count("A")==3 or d.count("B")==3: print("No") else: print("Yes")
[ "literal.string.change", "call.arguments.change", "io.output.change" ]
528,377
528,378
u131881594
python
p02753
S=input() l = ['AAA','BBB'] if S in l: print('No') if S not in l: print('No')
S=input() l = ['AAA','BBB'] if S in l: print('No') if S not in l: print('Yes')
[ "literal.string.change", "call.arguments.change", "io.output.change" ]
528,381
528,382
u814271993
python
p02753
S = list(input()) if S.count('A') == 3 or S.count('A') == 0: print('Yes') else: print('No')
S = list(input()) if S.count('A') == 3 or S.count('A') == 0: print('No') else: print('Yes')
[ "literal.string.change", "call.arguments.change", "io.output.change" ]
528,407
528,408
u573900545
python
p02753
S = input() if S.count('A') == 3 or S.count('B') == 3: print("NO") else: print("YES")
S = input() if S.count('A') == 3 or S.count('B') == 3: print("No") else: print("Yes")
[ "literal.string.change", "literal.string.case.change", "call.arguments.change", "io.output.change" ]
528,413
528,414
u626684023
python
p02753
s = input() if s[1]==s[2]==s[3]: print('No') else: print('Yes')
s = input() if s[1]==s[2]==s[0]: print('No') else: print('Yes')
[ "literal.number.integer.change", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change" ]
528,415
528,416
u190405389
python
p02753
print('Yes' if S != 'AAA' and S != 'BBB' else 'No')
S = input() print('Yes' if S != 'AAA' and S != 'BBB' else 'No')
[ "assignment.add" ]
528,421
528,422
u374531474
python
p02753
print('Yes'if input() in ['AAA', 'BBB'] else 'No')
print('No'if input() in ['AAA', 'BBB'] else 'Yes')
[ "literal.string.change", "call.arguments.change", "io.output.change" ]
528,446
528,447
u634046173
python
p02753
s=input() print("YNeos"[s != len(s) * s[0]::2])
s=input() print("YNeos"[s == len(s) * s[0]::2])
[ "misc.opposites", "expression.operator.compare.change", "variable_access.subscript.index.change", "call.arguments.change", "io.output.change" ]
528,454
528,455
u013202780
python
p02753
import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines S = readline().decode().split() if 'A' in S and 'B' in S: print('Yes') else: print('No')
import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines S = readline().decode() if 'A' in S and 'B' in S: print('Yes') else: print('No')
[ "call.remove" ]
528,456
528,457
u515740713
python
p02753
S = str(input()) if S == 'AAA': print('Yes') elif S == 'BBB': print('Yes') else: print('No')
S = str(input()) if S == 'AAA': print('No') elif S == 'BBB': print('No') else: print('Yes')
[ "literal.string.change", "call.arguments.change", "io.output.change" ]
528,470
528,471
u925353288
python
p02753
s=input() l=set(s) if(len(s)==1): print("No") else: print("Yes")
s=input() l=set(s) if(len(l)==1): print("No") else: print("Yes")
[ "identifier.change", "control_flow.branch.if.condition.change" ]
528,472
528,473
u512551187
python
p02753
s=input() if a[0]==a[1]==a[2]: print("No") else: print("Yes")
a=list(input()) if a[0]==a[1]==a[2]: print("No") else: print("Yes")
[ "assignment.variable.change", "identifier.change", "call.add", "call.arguments.change" ]
528,480
528,481
u705418271
python
p02753
a = input() b = 0 c = 0 i = 0 while i < a : if a[i] == "A" : b = b + 1 if a[i] == "B" : c = c + 1 i = i + 1 if (b > 0) and (c > 0) : print("Yes") else: print("No")
a = input() b = 0 c = 0 i = 0 while i < len(a) : if a[i] == "A" : b = b + 1 if a[i] == "B" : c = c + 1 i = i + 1 if (b > 0) and (c > 0) : print("Yes") else: print("No")
[ "control_flow.loop.condition.change", "call.add" ]
528,484
528,485
u562147608
python
p02753
s=input() if 'AAA' in s or 'BBB' in s: print("NO") else: print("Yes")
s=input() if 'AAA' in s or 'BBB' in s: print("No") else: print("Yes")
[ "literal.string.change", "literal.string.case.change", "call.arguments.change", "io.output.change" ]
528,486
528,487
u496009935
python
p02753
s = set(list(input())) if s == 1: print("No") else: print("Yes")
s = set(list(input())) if len(s) == 1: print("No") else: print("Yes")
[ "control_flow.branch.if.condition.change", "call.add" ]
528,498
528,499
u867826040
python
p02753
# ABC158 # A Station and Bus import re s = input() x = s[0] m = re.match(x+x+x,s) if m: print("Yes") exit() print("No")
import re s = input() x = s[0] m = re.match(x+x+x,s) if m: print("No") exit() print("Yes")
[ "literal.string.change", "call.arguments.change", "io.output.change" ]
528,523
528,524
u987637902
python
p02753
s = input() if s[0] == s[1] == s[2]: print("Yes") else: print("No")
s = input() if s[0] == s[1] == s[2]: print("No") else: print("Yes")
[ "literal.string.change", "call.arguments.change", "io.output.change" ]
528,536
528,537
u265118937
python