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
p02818
n = list(map(int,input().split())) ans1 = n[1] - n[2] ans2 = (n[0] + n[1]) - n[2] if ans1 <= 0: ans1 = 0 if ans1 > 0: ans2 = n[1] elif ans2 <= 0: ans2 = 0 print(ans1,ans2)
n = list(map(int,input().split())) ans1 = n[0] - n[2] ans2 = (n[0] + n[1]) - n[2] if ans1 <= 0: ans1 = 0 if ans1 > 0: ans2 = n[1] elif ans2 <= 0: ans2 = 0 print(ans1,ans2)
[ "literal.number.integer.change", "assignment.value.change", "variable_access.subscript.index.change", "expression.operation.binary.change" ]
622,248
622,249
u900848911
python
p02818
a,b,c=map(int,input().split()) if a >= c: print(a-c,0) else: print(0,max(a+b-c,0))
a,b,c=map(int,input().split()) if a >= c: print(a-c,b) else: print(0,max(a+b-c,0))
[ "identifier.replace.add", "literal.replace.remove", "call.arguments.change", "io.output.change" ]
622,252
622,254
u772118381
python
p02818
a,b,c=input().split() if a >= c: print(a-c,b) else: print(0,max(a+b-c,0))
a,b,c=map(int,input().split()) if a >= c: print(a-c,b) else: print(0,max(a+b-c,0))
[ "call.add", "call.arguments.change" ]
622,256
622,254
u772118381
python
p02818
A,B,K = map(int, input().split()) takahashi_cookie = A aoki_cookie = B iteration = K if 0 <= takahashi_cookie - iteration: takahashi_cookie -= iteration elif 0 <= aoki_cookie + takahashi_cookie - iteration: aoki_cookie = aoki_cookie + takahashi_cookie - iteration takahashi_cookie = 0 else: takahashi_cookie = 1 aoki_cookie = 1 print(str(takahashi_cookie) + ' ' + str(aoki_cookie))
A,B,K = map(int, input().split()) takahashi_cookie = A aoki_cookie = B iteration = K if 0 <= takahashi_cookie - iteration: takahashi_cookie -= iteration elif 0 <= aoki_cookie + takahashi_cookie - iteration: aoki_cookie = aoki_cookie + takahashi_cookie - iteration takahashi_cookie = 0 else: takahashi_cookie = 0 aoki_cookie = 0 print(str(takahashi_cookie) + ' ' + str(aoki_cookie))
[ "literal.number.integer.change", "assignment.value.change" ]
622,257
622,258
u898428248
python
p02818
A,B,K = map(int, input().split()) takahashi_cookie = A aoki_cookie = B iteration = K if 0 <= takahashi_cookie - iteration: takahashi_cookie -= iteration elif 2 <= aoki_cookie + takahashi_cookie - iteration: aoki_cookie = aoki_cookie + takahashi_cookie - iteration takahashi_cookie = 0 else: takahashi_cookie = 1 aoki_cookie = 1 print(str(takahashi_cookie) + ' ' + str(aoki_cookie))
A,B,K = map(int, input().split()) takahashi_cookie = A aoki_cookie = B iteration = K if 0 <= takahashi_cookie - iteration: takahashi_cookie -= iteration elif 0 <= aoki_cookie + takahashi_cookie - iteration: aoki_cookie = aoki_cookie + takahashi_cookie - iteration takahashi_cookie = 0 else: takahashi_cookie = 0 aoki_cookie = 0 print(str(takahashi_cookie) + ' ' + str(aoki_cookie))
[ "literal.number.integer.change", "control_flow.branch.if.condition.change", "assignment.value.change" ]
622,259
622,258
u898428248
python
p02818
A,B,K = map(int,input().split()) if A <= K: print(0, B-(K-A)) else: print(A-K, B)
A,B,K = map(int,input().split()) if A <= K: print(0, max(B-(K-A),0)) else: print(A-K, B)
[ "call.add", "call.arguments.add" ]
622,266
622,267
u266874640
python
p02818
taka, aoki, action = map(int, input().split()) if taka >= action: print(taka-action, aoki) else: print(0, max(aoki-(action-taka, 0)))
taka, aoki, action = map(int, input().split()) if taka >= action: print(taka-action, aoki) else: print(0, max(taka+aoki-action, 0))
[ "call.arguments.change", "expression.operation.binary.remove" ]
622,270
622,271
u418948864
python
p02818
from sys import stdout printn = lambda x: stdout.write(x) inn = lambda : int(input()) inl = lambda: list(map(int, input().split())) inm = lambda: map(int, input().split()) DBG = True # and False BIG = 999999999 R = 10**9 + 7 def ddprint(x): if DBG: print(x) a,b,k = inm() print("{} {}".format(max(0,a-k), b-max(0,k-a)))
from sys import stdout printn = lambda x: stdout.write(x) inn = lambda : int(input()) inl = lambda: list(map(int, input().split())) inm = lambda: map(int, input().split()) DBG = True # and False BIG = 999999999 R = 10**9 + 7 def ddprint(x): if DBG: print(x) a,b,k = inm() print("{} {}".format(max(0,a-k), max(0,b-max(0,k-a))))
[ "call.add", "call.arguments.change" ]
622,277
622,278
u102445737
python
p02818
a, b, k = map(int, input().split()) print(max(a - k, 0), b - max(k - a, 0))
a, b, k = map(int, input().split()) print(max(a - k, 0), max(b - max(k - a, 0), 0))
[ "call.add", "call.arguments.add" ]
622,288
622,289
u572002343
python
p02818
a,b,k=map(int,input().split()) if k<a: print(k-a,b) elif a<=k<a+b: print(0,b-(k-a)) else: print(0,0)
a,b,k=map(int,input().split()) if k<a: print(a-k,b) elif a<=k<a+b: print(0,b-(k-a)) else: print(0,0)
[ "expression.operation.binary.remove" ]
622,292
622,293
u901582103
python
p02818
a,b,k = map(int,input().split()) A = max(a-k,0) B = max(b-k+a,0) print(A,B)
a,b,k = map(int,input().split()) A = max(a-k,0) B = max(b-max(k-a,0),0) print(A,B)
[ "call.add", "misc.opposites", "expression.operator.arithmetic.change", "assignment.value.change", "call.arguments.change", "expression.operation.binary.change", "call.arguments.add" ]
622,296
622,297
u192154323
python
p02818
A,B,K = map(int, input().split()) if (A+B)-K < 0: print(0,0) elif A-K<0: print(0,A+B-K) elif A-K>0: print(A-K,B)
A,B,K = map(int, input().split()) if (A+B)-K <= 0: print(0,0) elif A-K<=0: print(0,A+B-K) elif A-K>0: print(A-K,B)
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
622,300
622,301
u230621983
python
p02818
a, b, k = input().split(' ') a = int(a) b = int(b) k = int(k) if (k > a + b): print('0 0') else: if (k < a): print(a-k, end = ' ') print(b) else: print('0',end = ' ') print(b - k)
a, b, k = input().split(' ') a = int(a) b = int(b) k = int(k) if (k >= a + b): print('0 0') else: if (k <= a): print(a-k, end = ' ') print(b) else: print('0',end = ' ') print(b - k + a)
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
622,302
622,303
u705147591
python
p02818
a, b, k = input().split(' ') a = int(a) b = int(b) k = int(k) if (k >= a + b): print('0 0') else: if (k <= a): print(a-k, end = ' ') print(b) else: print('0',end = ' ') print(b - k)
a, b, k = input().split(' ') a = int(a) b = int(b) k = int(k) if (k >= a + b): print('0 0') else: if (k <= a): print(a-k, end = ' ') print(b) else: print('0',end = ' ') print(b - k + a)
[ "expression.operation.binary.add" ]
622,304
622,303
u705147591
python
p02818
list=input().split() A=int(list[0]) B=int(list[1]) K=int(list[2]) if A >= K: print((A-K) + " " + B) else: print("0 "+ str(max(B-(K-A),0)) )
list=input().split() A=int(list[0]) B=int(list[1]) K=int(list[2]) if A >= K: print(str((A-K)) + " " + str(B)) else: print("0 "+ str(max(B-(K-A),0)) )
[ "call.arguments.add", "call.arguments.change", "call.add" ]
622,313
622,314
u824327013
python
p02818
A, B, K = [int(_) for _ in input().split()] X = max(0, A - K) Y = min(A + B - K, B) print(X, Y)
A, B, K = [int(_) for _ in input().split()] X = max(0, A - K) Y = max(0, min(A + B - K, B)) print(X, Y)
[ "call.add", "call.arguments.change" ]
622,315
622,316
u942697937
python
p02818
a,b,k=map(int,input().split()) print(a-min(a,k),b-min(b,a-min(a,k)))
a,b,k=map(int,input().split()) print(a-min(a,k),b-min(b,k-min(a,k)))
[ "identifier.change", "call.arguments.change", "expression.operation.binary.change", "io.output.change" ]
622,317
622,318
u713008740
python
p02818
a,b,k=map(int,input.split()) printf(a-min(a,k),b-min(b,a-min(a,k)))
a,b,k=map(int,input().split()) print(a-min(a,k),b-min(b,k-min(a,k)))
[ "call.add", "identifier.change", "call.function.change", "io.output.change", "call.arguments.change", "expression.operation.binary.change" ]
622,320
622,318
u713008740
python
p02818
# coding: utf-8 import numpy as np from functools import lru_cache import time def main(): if True: A,B,K = list(map( int, input().split())) else: pass A = A - K B = B if A > 0 else B + A print(max(A,0),B) if __name__ =='__main__': main()
# coding: utf-8 import numpy as np from functools import lru_cache import time def main(): if True: A,B,K = list(map( int, input().split())) else: pass A = A - K B = B if A > 0 else B + A print(max(A,0),max(B,0)) if __name__ =='__main__': main()
[ "call.add", "call.arguments.add" ]
622,322
622,323
u721047793
python
p02818
A, B, K = map(int, input().split()) print(max(A - K, 0), min(A + B - K, B))
A, B, K = map(int, input().split()) print(max(A - K, 0), max(min(A + B - K, B), 0))
[ "call.add", "call.arguments.add" ]
622,326
622,327
u796942881
python
p02818
# -*- coding: utf-8 -*- a,b,k = map(int,input().split()) """ for i in range(k): if a >= 1: a -= 1 elif b >= 1: b -= 1 print(a,b) """ if k <= a and a >= 1: a = a - k elif k <= b and b >= 1: c = a a = 0 b = b - (k - c) else: a = 0 b = 0 print(a, b)
# -*- coding: utf-8 -*- a,b,k = map(int,input().split()) """ for i in range(k): if a >= 1: a -= 1 elif b >= 1: b -= 1 print(a,b) """ if k <= a and a >= 1: a = a - k elif k <= a + b and b >= 1: c = a a = 0 b = b - (k - c) else: a = 0 b = 0 print(a, b)
[ "control_flow.branch.if.condition.change" ]
622,332
622,333
u977661421
python
p02818
a, b, k = map(int, input().split()) if k - a > 0: a = 0 k -= a if k - b > 0: b = 0 print(str(a) + " " + str(b)) else: b -= k print(str(a) + " " + str(b)) else: a -= k print(str(a) + " " + str(b))
a, b, k = map(int, input().split()) if k - a > 0: k -= a a = 0 if k - b > 0: b = 0 print(str(a) + " " + str(b)) else: b -= k print(str(a) + " " + str(b)) else: a -= k print(str(a) + " " + str(b))
[ "assignment.remove", "assignment.add" ]
622,336
622,337
u821906920
python
p02818
a, b, k = map(int, input().split()) if k <= a: print(str(k-a) + " " + str(b)) elif k <= a + b: print(str(0) + " " + str(b-(k-a))) else: print(str(0) + " " + str(0))
a, b, k = map(int, input().split()) if k <= a: print(str(a-k) + " " + str(b)) elif k <= a + b: print(str(0) + " " + str(b-(k-a))) else: print(str(0) + " " + str(0))
[ "expression.operation.binary.remove" ]
622,348
622,349
u998082063
python
p02818
a,b,k = map(int,input().split()) print(max(0,a-k), max(b+a-k, 0))
a,b,k = map(int,input().split()) print(max(0,a-k), max(b+min(a-k,0), 0))
[ "call.add", "call.arguments.add" ]
622,352
622,353
u298297089
python
p02818
a,b,k=map(int,input().split()) if a>=k: aans=a-k; bans=b else: aans=0; bans=b-(k-a) print(aans,bans)
a,b,k=map(int,input().split()) if a>=k: aans=a-k; bans=b else: aans=0; bans=max(0,b-(k-a)) print(aans,bans)
[ "call.add", "call.arguments.change" ]
622,360
622,361
u130900604
python
p02818
a,b,k=map(int, input().split()) if a-k>=0: print(a-k, b) elif a-k<0: print(0, b+(a-k))
a,b,k=map(int, input().split()) if a-k>=0: print(a-k, b) elif a-k<0: print(0, max(0,b+(a-k)))
[ "call.arguments.add", "call.arguments.change" ]
622,362
622,363
u260216890
python
p02818
A, B, K = map(int, input().split()) if A >= K: print(A - K, B) else: print(0, B - (K - A))
A, B, K = map(int, input().split()) if A >= K: print(A - K, B) else: print(0, max(0, B - (K - A)))
[ "call.arguments.add", "call.arguments.change" ]
622,364
622,365
u577138895
python
p02818
a,b,n = list(map(int, input().split())) if a+b<=n: a=0 b=0 else: if n>a: b -= n-a a=0 if b < 0: b = 0 else: a = n-a print("%d %d" %(a,b))
a,b,n = list(map(int, input().split())) if a+b<=n: a=0 b=0 else: if n>a: b -= n-a a=0 if b < 0: b = 0 else: a = a - n print("%d %d" %(a,b))
[ "expression.operation.binary.remove" ]
622,368
622,369
u527616458
python
p02818
a,b,n = list(map(int, input().split())) if a+b<=n: a=0 b=0 else: if n>a: b-=(n-a) a=0 if b<0: b=0 else: a=n-a print("%d %d" %(a,b))
a,b,n = list(map(int, input().split())) if a+b<=n: a=0 b=0 else: if n>a: b -= n-a a=0 if b < 0: b = 0 else: a = a - n print("%d %d" %(a,b))
[ "expression.operation.binary.remove" ]
622,371
622,369
u527616458
python
p02818
a,b,k = map(int,input().split()) if k > a: a=0 k-=a if k > b: b=0 else: b-=k else: a-=k print(' '.join([str(a),str(b)]))
a,b,k = map(int,input().split()) if k > a: k-=a a=0 if k > b: b=0 else: b-=k else: a-=k print(' '.join([str(a),str(b)]))
[ "assignment.remove", "assignment.add" ]
622,375
622,376
u514894322
python
p02818
A,B,K = map(int,input().split()) if (A - K) <= 0 and 0 < B - K + A : B = B - K + A print(0,B) elif (A - K) <= 0 and B - K + A < 0: print(0,0) elif 0 < (A - K): print(A-K,B)
A,B,K = map(int,input().split()) if (A - K) <= 0 and 0 < B - K + A : B = B - K + A print(0,B) elif (A - K) <= 0 and B - K + A <= 0: print(0,0) elif 0 < (A - K): print(A-K,B)
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
622,379
622,380
u850772037
python
p02818
a,b,k = map(int,input().split()) if k < a: a -= k elif a < k < a+b: b -= (k - a) a = 0 elif k >= a+b: a = 0 b = 0 print("{} {}".format(a,b))
a,b,k = map(int,input().split()) if k <= a: a -= k elif a < k < a+b: b -= (k - a) a = 0 elif k >= a+b: a = 0 b = 0 print("{} {}".format(a,b))
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
622,383
622,384
u952406466
python
p02818
a, b, k =map(int,input().split()) if a>k: print(a-k,b) elif a+b>=k: print(0,b-k-a) else: print(0,0)
a, b, k =map(int,input().split()) if a>k: print(a-k,b) elif a+b>=k: print(0,b-(k-a)) else: print(0,0)
[ "call.arguments.change" ]
622,403
622,404
u871440947
python
p02818
a,b,k = map(int,input().split()) ans_a = max(a-k, 0) ans_b = b - max(k-a,0) print(ans_a, ans_b)
a,b,k = map(int,input().split()) ans_a = max(a-k, 0) ans_b = max(b - max(k-a,0),0) print(ans_a, ans_b)
[ "call.add", "call.arguments.add" ]
622,407
622,408
u896791216
python
p02818
Takahashi, Aoki, count = input().split() tk = int(Takahashi) ak = int(Aoki) c = int(count) t = 0 if tk >= c: tk = tk - c else: tk = 0 c = c - tk if ak >= c: ak = ak - c else: ak = 0 print(tk, ak)
Takahashi, Aoki, count = input().split() tk = int(Takahashi) ak = int(Aoki) c = int(count) t = 0 if tk >= c: tk = tk - c else: c = c - tk tk = 0 if ak >= c: ak = ak - c else: ak = 0 print(tk, ak)
[ "assignment.remove", "assignment.add" ]
622,441
622,442
u488925368
python
p02818
A, B, K = map(int, input().split()) print(max(A - K, 0), B - max(K - A, 0))
A, B, K = map(int, input().split()) print(max(A - K, 0), max(B - max(K - A, 0), 0))
[ "call.add", "call.arguments.add" ]
622,456
622,457
u332906195
python
p02818
A,B,K = map(int,input().split()) if A-K>=0: print(A-K,end=" ") print(B) elif A-K<0 and K-A-B>=0: print("0",end=" ") print(B-(K-A)) else: print("0 0")
A,B,K = map(int,input().split()) if A-K>=0: print(A-K,end=" ") print(B) elif A-K<0 and A+B-K>=0: print("0",end=" ") print(B-(K-A)) else: print("0 0")
[ "expression.operation.binary.remove", "misc.opposites", "expression.operator.arithmetic.change", "control_flow.branch.if.condition.change" ]
622,458
622,459
u497952650
python
p02818
a = list(map(int,input().split())) A = a[0] B = a[1] K = a[2] A1 = A - K if A1 < 0: B1 = A1 + B A1 = 0 if B1 < 0: B1 = 0 print(A1,end=" ") print(B1)
a = list(map(int,input().split())) A = a[0] B = a[1] K = a[2] A1 = A - K B1 = B if A1 < 0: B1 = A1 + B A1 = 0 if B1 < 0: B1 = 0 print(A1,end=" ") print(B1)
[ "assignment.add" ]
622,462
622,463
u099022530
python
p02818
a,b,k=map(int,input().split()) A=max(a-k,0) B=max(b-(k-A),0) print(A,B)
a,b,k=map(int,input().split()) A=max(a-k,0) B=max(b-(k-(a-A)),0) print(A,B)
[ "call.arguments.change" ]
622,468
622,469
u314252953
python
p02818
a,b,k=map(int,input().split()) #食べられた後のa A=a #食べられた後のb B=b K=k if a>=k: A=a-k print(A,B) if a<k: B=b-(k-a) A=0 if k-a>=b: B=0 print(A,B) else: A=0 B=0 print(A,B)
a,b,k=map(int,input().split()) #食べられた後のa A=a #食べられた後のb B=b K=k if a>=k: A=a-k print(A,B) elif a<k: B=b-(k-a) A=0 if k-a>=b: B=0 print(A,B) else: A=0 B=0 print(A,B)
[ "control_flow.branch.if.replace.remove", "control_flow.branch.else_if.replace.add" ]
622,472
622,473
u314252953
python
p02818
a, b, k = map(int, input().split()) if a >= k: print(a - k, b) else: print(0, max(k - a - b, b - k + a))
a, b, k = map(int, input().split()) if a >= k: print(a - k, b) else: print(0, max(0, b - k + a))
[ "identifier.replace.remove", "literal.replace.add", "call.arguments.change", "expression.operation.binary.change", "io.output.change", "expression.operation.binary.remove" ]
622,477
622,478
u912997017
python
p02818
a,b,k = [int(i) for i in input().split()] if a + b >= k: print(0,0) elif k >= a: print(0, b - (k-a)) else: print(a-k,b)
a,b,k = [int(i) for i in input().split()] if a + b <= k: print(0,0) elif k >= a: print(0, b - (k-a)) else: print(a-k,b)
[ "misc.opposites", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
622,479
622,480
u183840468
python
p02818
a,b,k=map(int,input().split()) d=a+b if(k>=d): print("0 0") elif(d>k and a<k): print("0 ",d-k) elif(d>k and a>k): print(a-k,b) elif(a<k and d>=k): print("0 ",d-k)
a,b,k=map(int,input().split()) d=a+b if(k>=d): print("0 0") elif(d>k and a<k): print("0 ",d-k) elif(d>k and a>=k): print(a-k,b) elif(a<k and d>=k): print("0 ",d-k)
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
622,481
622,482
u998008108
python
p02818
a, b, k = map(int, input().split()) if a >= k: a = a-k elif a + b >= k: a = 0 b = b - (k-a) else: a = 0 b = 0 print(str(a)+" "+str(b))
a, b, k = map(int, input().split()) if a >= k: a = a-k elif a + b >= k: b = b - (k-a) a = 0 else: a = 0 b = 0 print(str(a)+" "+str(b))
[ "assignment.remove", "assignment.add" ]
622,495
622,496
u272336707
python
p02818
a,b,k = map(int, input().split()) if k <= a: print(a-k,b) elif a<k and k<= b: print(0,a+b-k) else: print(0,0)
a,b,k = map(int, input().split()) if k <= a: print(a-k,b) elif a<k and k-a<= b: print(0,a+b-k) else: print(0,0)
[ "control_flow.branch.if.condition.change" ]
622,517
622,518
u560988566
python
p02818
a, b, k = map(int, input().split()) if a+b < k: print('0 0') elif a < k: print('{} {}'.format(0, a+b-k)) else: print('{} {}'.format(a-k, 0))
a, b, k = map(int, input().split()) if a+b < k: print('0 0') elif a < k: print('{} {}'.format(0, a+b-k)) else: print('{} {}'.format(a-k, b))
[ "identifier.replace.add", "literal.replace.remove", "call.arguments.change", "io.output.change" ]
622,525
622,523
u306142032
python
p02818
from sys import stdin as st def main(): l = [int(e) for e in st.readline().split()] if l[0] <= l[2]: l[2] -= l[0] l[0] = 0 if l[1] == l[2]: print('0 0') else: l[1] -= l[2] l[2] = 0 print('%d %d' % (l[0], l[1])) else: l[0] -= l[2] l[2] = 0 print('%d %d' % (l[0], l[1])) main()
from sys import stdin as st def main(): l = [int(e) for e in st.readline().split()] if l[0] <= l[2]: l[2] -= l[0] l[0] = 0 if l[1]<=l[2]: print('0 0') else: l[1] -= l[2] l[2] = 0 print('%d %d' % (l[0], l[1])) else: l[0] -= l[2] l[2] = 0 print('%d %d' % (l[0], l[1])) main()
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
622,530
622,531
u505493564
python
p02818
A,B,K = map(int, input().split()) if A >= K: print(*[A-K+B,B]) elif B >= (K-A): print(*[0,B-K+A]) else: print(*[0,0])
A,B,K = map(int, input().split()) if A >= K: print(*[A-K,B]) elif B >= (K-A): print(*[0,B-K+A]) else: print(*[0,0])
[ "expression.operation.binary.remove" ]
622,533
622,534
u847758719
python
p02818
a,b,c = map(int,input().split()) if c<a: print(a-c,b) else: print(0,b+a-c)
a,b,c = map(int,input().split()) if c<a: print(a-c,b) else: print(0,max(b+a-c,0))
[ "call.add", "call.arguments.add" ]
622,537
622,539
u785578220
python
p02818
a,b,k=map(int,input().split()) if a<=k: a=0 if b<=k-a: b=0 else: b=b-k+a else: a=a-k print(str(a)+" "+str(b))
a,b,k=map(int,input().split()) if a<=k: if b<=k-a: b=0 else: b=b-k+a a=0 else: a=a-k print(str(a)+" "+str(b))
[ "assignment.remove", "assignment.add" ]
622,540
622,541
u723792785
python
p02818
#coding:utf-8 a, b, k = map(int, input().split()) if k <= a: a = a - k elif a < k and k <= (a + b): b = k - a a = 0 elif (a + b) < k: a = 0 b = 0 print(a, b)
#coding:utf-8 a, b, k = map(int, input().split()) if k <= a: a = a - k elif a < k and k <= (a + b): b = b - (k - a) a = 0 elif (a + b) < k: a = 0 b = 0 print(a, b)
[ "assignment.change" ]
622,542
622,543
u167908302
python
p02818
a, b, k = map(int, input()) c = min(a,k) a -= c k -= c b -= min(b, k) print(a, b)
a, b, k = map(int, input().split()) c = min(a,k) a -= c k -= c b -= min(b, k) print(a, b)
[ "call.add" ]
622,550
622,551
u114801897
python
p02818
a,b,c=map(int,input().split()) if a<=c: print(max(a+b-c,0)) else: print(a-c)
a,b,c=map(int,input().split()) if a<=c: print(0,max(a+b-c,0)) else: print(a-c,b)
[ "call.arguments.add" ]
622,554
622,555
u905582793
python
p02818
inpl = lambda: list(map(int,input().split())) A, B, K = inpl() if K <= A: print(A, B) elif K <= A+B: print(0, A+B-K) else: print(0, 0)
inpl = lambda: list(map(int,input().split())) A, B, K = inpl() if K <= A: print(A-K, B) elif K <= A+B: print(0, A+B-K) else: print(0, 0)
[ "expression.operation.binary.add" ]
622,562
622,563
u894258749
python
p02818
inpl = lambda: list(map(int,input().split())) A, B, K = inpl() if K <= A: print(A, B) elif K <= A+B: print(0, A+B-K) else: print(0)
inpl = lambda: list(map(int,input().split())) A, B, K = inpl() if K <= A: print(A-K, B) elif K <= A+B: print(0, A+B-K) else: print(0, 0)
[ "call.arguments.add" ]
622,564
622,563
u894258749
python
p02818
a=[int(i) for i in input().split()] if a[0]+a[1]<=a[2]: print(0,0) else: if a[0]<=a[2]: print(0,a[1]-(a[2]-a[0])) elif a[0]>a[2]: print(a[2]-a[0],a[1])
a=[int(i) for i in input().split()] if a[0]+a[1]<=a[2]: print(0,0) else: if a[0]<=a[2]: print(0,a[1]-(a[2]-a[0])) elif a[0]>a[2]: print(a[0]-a[2],a[1])
[ "literal.number.integer.change", "variable_access.subscript.index.change", "call.arguments.change", "expression.operation.binary.change", "io.output.change" ]
622,567
622,569
u557729026
python
p02818
a=[int(i) for i in input().split()] if a[0]+a[1]<=a[2]: print(0,0) elif a[0]<=a[2]: print(0,a[1]-(a[2]-a[0])) elif a[0]>a[2]: print(a[2]-a[0],a[1])
a=[int(i) for i in input().split()] if a[0]+a[1]<=a[2]: print(0,0) else: if a[0]<=a[2]: print(0,a[1]-(a[2]-a[0])) elif a[0]>a[2]: print(a[0]-a[2],a[1])
[ "literal.number.integer.change", "variable_access.subscript.index.change", "call.arguments.change", "expression.operation.binary.change", "io.output.change" ]
622,570
622,569
u557729026
python
p02818
a,b,k=input().split() if(k<=a): print(a-k,b) elif(k>a and k<=a+b): print(0,b-k+a) else: print(0,0)
a,b,k=map(int,input().split()) if(k<=a): print(a-k,b) elif(k>a and k<=a+b): print(0,b-k+a) else: print(0,0)
[ "call.add", "call.arguments.change" ]
622,577
622,579
u615402829
python
p02818
A,B,K=map(int,input().split()) a=0 b=0 if A>=K: a=A-K elif B-(K-A)>=0: b=B-(K-A) else: pass print(a,b)
A,B,K=map(int,input().split()) a=0 b=0 if A>=K: a=A-K b=B elif B-(K-A)>=0: b=B-(K-A) else: pass print(a,b)
[ "assignment.add" ]
622,583
622,584
u547608423
python
p02818
A, B, K =map(int, input().split()) if K<A: A_after=A-K elif K>=A: A_after=0 if K-A<B: B_after=B-(K-A) elif K-A>=B: B_after=0 print(A_after, B_after)
A, B, K =map(int, input().split()) if K<A: A_after=A-K B_after=B elif K>=A: A_after=0 if K-A<B: B_after=B-(K-A) elif K-A>=B: B_after=0 print(A_after, B_after)
[ "assignment.add" ]
622,586
622,587
u985835425
python
p02818
import sys sys.setrecursionlimit(1000000000000000) a, b, k = map(int, input().split()) if a >= k: a = a - k print("{} {}".format(a, b)) elif k > a and a + b >= k: b = a + b - k print("{} {}".format(0, b)) else: print("{} {}".format(0, 0))
import sys sys.setrecursionlimit(1000000000) a, b, k = map(int, input().split()) if a >= k: a = a - k print("{} {}".format(a, b)) elif k > a and a + b >= k: b = a + b - k print("{} {}".format(0, b)) else: print("{} {}".format(0, 0))
[ "literal.number.integer.change", "call.arguments.change" ]
622,593
622,594
u931118906
python
p02815
from bisect import bisect_left n=int(input()) c=sorted(list(map(int,input().split()))) mod=10**9+7 #2のx乗を前計算(mod)(0~N-1) p=[1]*(n+1) for i in range(n): p[i+1]=p[i]*2 p[i+1]%=mod ans=0 #それ以上のもの for i in range(n): b=bisect_left(c,c[i]) x=n-b-1 ans+=(p[x]+x*p[x-1])*c[i]*p[b] ans%=mod print(ans*p[n]%mod)
from bisect import bisect_left n=int(input()) c=sorted(list(map(int,input().split()))) mod=10**9+7 #2のx乗を前計算(mod)(0~N-1) p=[1]*(n+1) for i in range(n): p[i+1]=p[i]*2 p[i+1]%=mod ans=0 #それ以上のもの for i in range(n): b=bisect_left(c,c[i]) x=n-i-1 ans+=(p[x]+x*p[x-1])*c[i]*p[i] ans%=mod print(ans*p[n]%mod)
[ "assignment.value.change", "identifier.change", "expression.operation.binary.change", "variable_access.subscript.index.change" ]
622,630
622,631
u989345508
python
p02805
n=int(input()) xy=[list(map(int,input().split())) for _ in range(n)] sgm=pow(10.-7) def func(c): allp=[] for i in range(n-1): for j in range(i+1,n): xi,yi=xy[i] xj,yj=xy[j] dx=xi-xj dy=yi-yj d=((xi-xj)**2+(yi-yj)**2)**0.5 if c**2-(d/2)**2<0:return False h=(c**2-(d/2)**2)**0.5 mx,my=(xi+xj)/2,(yi+yj)/2 if dx==0: allp.append([mx-h,my]) allp.append([mx+h,my]) elif dy==0: allp.append([mx,my-h]) allp.append([mx,my+h]) else: dx,dy=dy,-dx dh=(dy**2+dx**2)**0.5 dx*=h/dh dy*=h/dh allp.append([mx+dx,my+dy]) allp.append([mx-dx,my-dy]) for px,py in allp: flg=True for x,y in xy: if ((px-x)**2+(py-y)**2)**0.5>c+sgm: flg=False break if flg: return True return False r=2*max([abs(x) for x,y in xy])+max([abs(y) for x,y in xy]) l,r=0,r for i in range(300): c=(l+r)/2 if func(c): l,r=l,c else: l,r=c,r print(c) #print(c**2)
n=int(input()) xy=[list(map(int,input().split())) for _ in range(n)] sgm=pow(10,-7) def func(c): allp=[] for i in range(n-1): for j in range(i+1,n): xi,yi=xy[i] xj,yj=xy[j] dx=xi-xj dy=yi-yj d=((xi-xj)**2+(yi-yj)**2)**0.5 if c**2-(d/2)**2<0:return False h=(c**2-(d/2)**2)**0.5 mx,my=(xi+xj)/2,(yi+yj)/2 if dx==0: allp.append([mx-h,my]) allp.append([mx+h,my]) elif dy==0: allp.append([mx,my-h]) allp.append([mx,my+h]) else: dx,dy=dy,-dx dh=(dy**2+dx**2)**0.5 dx*=h/dh dy*=h/dh allp.append([mx+dx,my+dy]) allp.append([mx-dx,my-dy]) for px,py in allp: flg=True for x,y in xy: if ((px-x)**2+(py-y)**2)**0.5>c+sgm: flg=False break if flg: return True return False r=2*max([abs(x) for x,y in xy])+max([abs(y) for x,y in xy]) l,r=0,r for i in range(400): c=(l+r)/2 if func(c): l,r=l,c else: l,r=c,r print(c) #print(c**2)
[ "misc.typo", "assignment.value.change", "call.arguments.change", "expression.operation.binary.change", "literal.number.integer.change", "control_flow.loop.range.bounds.upper.change" ]
622,698
622,699
u707124227
python
p02805
from heapq import heappush,heappop,heapify from collections import deque,defaultdict,Counter import itertools from itertools import permutations,combinations,groupby import sys import bisect import string import math import time import random def S_(): return input() def LS(): return [i for i in input().split()] def I(): return int(input()) def MI(): return map(int,input().split()) def LI(): return [int(i) for i in input().split()] def LI_(): return [int(i)-1 for i in input().split()] def NI(n): return [int(input()) for i in range(n)] def NI_(n): return [int(input())-1 for i in range(n)] def StoI(): return [ord(i)-97 for i in input()] def ItoS(nn): return chr(nn+97) def LtoS(ls): return ''.join([chr(i+97) for i in ls]) def GI(V,E,Directed=False,index=0): org_inp=[] g=[[] for i in range(n)] for i in range(E): inp=LI() org_inp.append(inp) if index==0: inp[0]-=1 inp[1]-=1 if len(inp)==2: a,b=inp g[a].append(b) if not Directed: g[b].append(a) elif len(inp)==3: a,b,c=inp aa=(inp[0],inp[2]) bb=(inp[1],inp[2]) g[a].append(bb) if not Directed: g[b].append(aa) return g,org_inp def bit_combination(k,n=2): rt=[] for tb in range(n**k): s=[tb//(n**bt)%n for bt in range(k)] rt+=[s] return rt def show(*inp,end='\n'): if show_flg: print(*inp,end=end) YN=['Yes','No'] mo=10**9+7 inf=float('inf') l_alp=string.ascii_lowercase u_alp=string.ascii_uppercase ts=time.time() sys.setrecursionlimit(10**5) input=lambda: sys.stdin.readline().rstrip() def ran_input(): import random n=random.randint(4,16) rmin,rmax=1,10 a=[random.randint(rmin,rmax) for _ in range(n)] return n,a class Comb: def __init__(self,n,mo=10**9+7): self.fac=[0]*(n+1) self.inv=[1]*(n+1) self.fac[0]=1 self.fact(n) for i in range(1,n+1): self.fac[i]=i*self.fac[i-1]%mo self.inv[n]*=i self.inv[n]%=mo self.inv[n]=pow(self.inv[n],mo-2,mo) for i in range(1,n): self.inv[n-i]=self.inv[n-i+1]*(n-i+1)%mo return def fact(self,n): return self.fac[n] def invf(self,n): return self.inv[n] def comb(self,x,y): if y<0 or y>x: return 0 return self.fac[x]*self.inv[x-y]*self.inv[y]%mo show_flg=False show_flg=True def check(x,y,r): for s,t in c: if (x-s)**2+(y-t)**2>r: return False return True def cir3(x1,y1,x2,y2,x3,y3): p = ((y1-y3)*(y1**2 -y2**2 +x1**2 -x2**2) -(y1-y2)*(y1**2 -y3**2 +x1**2 -x3**2)) / (2*(y1-y3)*(x1-x2)-2*(y1-y2)*(x1-x3)) q = ((x1-x3)*(x1**2 -x2**2 +y1**2 -y2**2) -(x1-x2)*(x1**2 -x3**2 +y1**2 -y3**2)) / (2*(x1-x3)*(y1-y2)-2*(x1-x2)*(y1-y3)) r=((x1-p)**2+(y1-q)**2) return p,q,r def rot(x,y,q): s=x*math.cos(q)-y*math.sin(q) t=x*math.sin(q)+y*math.cos(q) return (s,t) def cir2(x1,y1,x2,y2): p,q=(x1+x2)/2,(y1+y2)/2 r=((x1-p)**2+(y1-q)**2) return p,q,r ans=inf n=I() c=[] CC=[] rx=random.randint(1,10**3) ry=random.randint(1,10**3) for i in range(n): x,y=LI() x+=rx y+=ry CC.append((x,y)) def solve(): ans=inf q=math.pi*random.randint(1,10**4)/10**4 for i in range(n): x,y=CC[i] x,y=rot(x,y,q) c.append((x,y)) for i in range(n): for j in range(i+1,n): po=c[i]+c[j] x1,y1,x2,y2=po p,q,r=cir2(x1,y1,x2,y2) if check(p,q,r): ans=min(ans,r) for i in range(n): for j in range(i+1,n): for k in range(j+1,n): x1,y1,x2,y2,x3,y3=CC[i]+CC[j]+CC[k] a,b= (x2-x1),(y2-y1) C,D= (x3-x1),(y3-y1) if a*D==b*C: continue x1,y1,x2,y2,x3,y3=c[i]+c[j]+c[k] p,q,r=cir3(x1,y1,x2,y2,x3,y3) if check(p,q,r): ans=min(ans,r) return ans an=inf for rn in range(1): an=min(an,solve()) print(an**0.5)
from heapq import heappush,heappop,heapify from collections import deque,defaultdict,Counter import itertools from itertools import permutations,combinations,groupby import sys import bisect import string import math import time import random def S_(): return input() def LS(): return [i for i in input().split()] def I(): return int(input()) def MI(): return map(int,input().split()) def LI(): return [int(i) for i in input().split()] def LI_(): return [int(i)-1 for i in input().split()] def NI(n): return [int(input()) for i in range(n)] def NI_(n): return [int(input())-1 for i in range(n)] def StoI(): return [ord(i)-97 for i in input()] def ItoS(nn): return chr(nn+97) def LtoS(ls): return ''.join([chr(i+97) for i in ls]) def GI(V,E,Directed=False,index=0): org_inp=[] g=[[] for i in range(n)] for i in range(E): inp=LI() org_inp.append(inp) if index==0: inp[0]-=1 inp[1]-=1 if len(inp)==2: a,b=inp g[a].append(b) if not Directed: g[b].append(a) elif len(inp)==3: a,b,c=inp aa=(inp[0],inp[2]) bb=(inp[1],inp[2]) g[a].append(bb) if not Directed: g[b].append(aa) return g,org_inp def bit_combination(k,n=2): rt=[] for tb in range(n**k): s=[tb//(n**bt)%n for bt in range(k)] rt+=[s] return rt def show(*inp,end='\n'): if show_flg: print(*inp,end=end) YN=['Yes','No'] mo=10**9+7 inf=float('inf') l_alp=string.ascii_lowercase u_alp=string.ascii_uppercase ts=time.time() sys.setrecursionlimit(10**5) input=lambda: sys.stdin.readline().rstrip() def ran_input(): import random n=random.randint(4,16) rmin,rmax=1,10 a=[random.randint(rmin,rmax) for _ in range(n)] return n,a class Comb: def __init__(self,n,mo=10**9+7): self.fac=[0]*(n+1) self.inv=[1]*(n+1) self.fac[0]=1 self.fact(n) for i in range(1,n+1): self.fac[i]=i*self.fac[i-1]%mo self.inv[n]*=i self.inv[n]%=mo self.inv[n]=pow(self.inv[n],mo-2,mo) for i in range(1,n): self.inv[n-i]=self.inv[n-i+1]*(n-i+1)%mo return def fact(self,n): return self.fac[n] def invf(self,n): return self.inv[n] def comb(self,x,y): if y<0 or y>x: return 0 return self.fac[x]*self.inv[x-y]*self.inv[y]%mo show_flg=False show_flg=True def check(x,y,r): for s,t in c: if (x-s)**2+(y-t)**2>r+1e-6: return False return True def cir3(x1,y1,x2,y2,x3,y3): p = ((y1-y3)*(y1**2 -y2**2 +x1**2 -x2**2) -(y1-y2)*(y1**2 -y3**2 +x1**2 -x3**2)) / (2*(y1-y3)*(x1-x2)-2*(y1-y2)*(x1-x3)) q = ((x1-x3)*(x1**2 -x2**2 +y1**2 -y2**2) -(x1-x2)*(x1**2 -x3**2 +y1**2 -y3**2)) / (2*(x1-x3)*(y1-y2)-2*(x1-x2)*(y1-y3)) r=((x1-p)**2+(y1-q)**2) return p,q,r def rot(x,y,q): s=x*math.cos(q)-y*math.sin(q) t=x*math.sin(q)+y*math.cos(q) return (s,t) def cir2(x1,y1,x2,y2): p,q=(x1+x2)/2,(y1+y2)/2 r=((x1-p)**2+(y1-q)**2) return p,q,r ans=inf n=I() c=[] CC=[] rx=random.randint(1,10**3) ry=random.randint(1,10**3) for i in range(n): x,y=LI() x+=rx y+=ry CC.append((x,y)) def solve(): ans=inf q=math.pi*random.randint(1,10**4)/10**4 for i in range(n): x,y=CC[i] x,y=rot(x,y,q) c.append((x,y)) for i in range(n): for j in range(i+1,n): po=c[i]+c[j] x1,y1,x2,y2=po p,q,r=cir2(x1,y1,x2,y2) if check(p,q,r): ans=min(ans,r) for i in range(n): for j in range(i+1,n): for k in range(j+1,n): x1,y1,x2,y2,x3,y3=CC[i]+CC[j]+CC[k] a,b= (x2-x1),(y2-y1) C,D= (x3-x1),(y3-y1) if a*D==b*C: continue x1,y1,x2,y2,x3,y3=c[i]+c[j]+c[k] p,q,r=cir3(x1,y1,x2,y2,x3,y3) if check(p,q,r): ans=min(ans,r) return ans an=inf for rn in range(1): an=min(an,solve()) print(an**0.5)
[ "control_flow.branch.if.condition.change", "control_flow.loop.for.condition.change" ]
622,724
622,725
u623819879
python
p02805
# 解法3(山登り法) import numpy as np N=int(input()) x=np.zeros([N,2]) for i in range(N): x[i,:] = list(map(float,input().split())) def norm(x,y):return np.sqrt(((x - y)**2).sum()) x0 = x.mean(0) old = x0 rate = 0.05 decay = 0.99 epsilon=1e-15 while 1: d = np.sqrt(((x - old)**2).sum(1)) max_, argmax = d.max(), d.argmax() direction = x[argmax, :] - old new = old + direction*rate rate *= decay if norm(new,old) <= epsilon:break old = new print(norm(direction, 0))
# 解法3(山登り法) import numpy as np N=int(input()) x=np.zeros([N,2]) for i in range(N): x[i,:] = list(map(float,input().split())) def norm(x,y):return np.sqrt(((x - y)**2).sum()) x0 = x.mean(0) old = x0 rate = 0.06 decay = 0.999 epsilon=1e-15 while 1: d = np.sqrt(((x - old)**2).sum(1)) max_, argmax = d.max(), d.argmax() direction = x[argmax, :] - old new = old + direction*rate rate *= decay if norm(new,old) <= epsilon:break old = new print(norm(direction, 0))
[ "literal.number.float.change", "assignment.value.change" ]
622,728
622,727
u401686269
python
p02805
# -*- coding: utf-8 -*- import sys import itertools import numpy as np read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines N = int(readline()) XY = [] for i in range(N): x,y = map(int,readline().split()) XY.append(x+y*1j) center = [] for z0,z1 in itertools.combinations(XY,2): center.append((z0+z1)/2) for z0,z1,z2 in itertools.combinations(XY,3): a = z1-z0 b = z2-z0 nume = a*b*(a.conjugate()-b.conjugate()) deno = a.conjugate()*b - a*b.conjugate() if deno == 0: continue c = nume / deno center.append(c) XY = np.array(XY) center = np.array(center) ans = abs(XY[:,None] - center[None,:]).max(axis=0).min() print(ans)
# -*- coding: utf-8 -*- import sys import itertools import numpy as np read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines N = int(readline()) XY = [] for i in range(N): x,y = map(int,readline().split()) XY.append(x+y*1j) center = [] for z0,z1 in itertools.combinations(XY,2): center.append((z0+z1)/2) for z0,z1,z2 in itertools.combinations(XY,3): a = z1-z0 b = z2-z0 nume = a*b*(a.conjugate()-b.conjugate()) deno = a.conjugate()*b - a*b.conjugate() if deno == 0: continue c = nume / deno c += z0 center.append(c) XY = np.array(XY) center = np.array(center) ans = abs(XY[:,None] - center[None,:]).max(axis=0).min() print(ans)
[]
622,731
622,732
u515740713
python
p02805
from numpy.linalg import det from numpy.linalg import solve import numpy as np import math def find_cross_point(x1, y1, x2, y2, x3, y3): A = np.array([[x2-x1, y2-y1], [x3-x2, y3-y2]]) B = np.array([(x2**2+y2**2-x1**2-y1**2)/2, (x3**2+y3**2-x2**2-y2**2)/2]) if det(A) == 0: return (float("inf"), float("inf")) C = solve(A, B) return C N = int(input()) ans = 10**10 plots = [] for i in range(N): x, y = map(int, input().split()) plots.append((x, y)) # 2点の間が直線になる時 for i in range(N): for j in range(i+1, N): sub = 0 m_x, m_y = (plots[i][0]+plots[j][0])/2, (plots[i][1]+plots[j][1])/2 for k in range(N): sub = max(sub, math.hypot(m_x-plots[k][0], m_y-plots[k][1])) ans = min(ans, sub) # 3点を円が通る時 for i in range(N): for j in range(i+1, N): for k in range(j+1, N): sub = 0 x1, y1 = plots[i] x2, y2 = plots[j] x3, y3 = plots[k] mx, my = find_cross_point(x1, y1, x2, y2, x3, y3) for p in range(N): sub = max(sub, math.hypot(m_x-plots[p][0], m_y-plots[p][1])) ans = min(ans, sub) print(ans)
from numpy.linalg import det from numpy.linalg import solve import numpy as np import math def find_cross_point(x1, y1, x2, y2, x3, y3): A = np.array([[x2-x1, y2-y1], [x3-x2, y3-y2]]) B = np.array([(x2**2+y2**2-x1**2-y1**2)/2, (x3**2+y3**2-x2**2-y2**2)/2]) if det(A) == 0: return (float("inf"), float("inf")) C = solve(A, B) return C N = int(input()) ans = 10**10 plots = [] for i in range(N): x, y = map(int, input().split()) plots.append((x, y)) # 2点の間が直線になる時 for i in range(N): for j in range(i+1, N): sub = 0 m_x, m_y = (plots[i][0]+plots[j][0])/2, (plots[i][1]+plots[j][1])/2 for k in range(N): sub = max(sub, math.hypot(m_x-plots[k][0], m_y-plots[k][1])) ans = min(ans, sub) # 3点を円が通る時 for i in range(N): for j in range(i+1, N): for k in range(j+1, N): sub = 0 x1, y1 = plots[i] x2, y2 = plots[j] x3, y3 = plots[k] m_x, m_y = find_cross_point(x1, y1, x2, y2, x3, y3) for p in range(N): sub = max(sub, math.hypot(m_x-plots[p][0], m_y-plots[p][1])) ans = min(ans, sub) print(ans)
[ "assignment.variable.change", "identifier.change" ]
622,745
622,746
u780962115
python
p02805
import math from itertools import combinations n = int(input()) xy = [list(map(int,input().split())) for i in range(n)] def enc(i,j,k): a,b = i c,d = j e,f = k aa = a * a bb = b * b cc = c * c dd = d * d ee = e * e ff = f * f if (2 * (e - a)*(b - d) - 2 * (c - a) * (b - f)) == 0: ymax = max(b,d,f) ymin = min(b,d,f) xmax = max(a,c,e) xmin = min(a,c,e) (px,py) = ((xmax-xmin)/2,(ymax-ymin)/2) r = math.hypot(xmax-xmin,ymax-ymin)/2 else: py = ((e - a) * (aa + bb - cc - dd) - (c - a) * (aa + bb - ee- ff)) / (2 * (e - a)*(b - d) - 2 * (c - a) * (b - f)) px = (2 * (b - f) * py - aa - bb + ee + ff) / (2 * (e - a)) \ if (c == a) else (2 * (b - d) * py - aa - bb + cc + dd) / (2 * (c - a)) r = math.hypot(px - a, py - b) return (r,px,py) def judge(r,px,py): ls = [math.hypot(px-x,py-y) for x,y in xy] if max(ls) <= r: return True else: return False ans = 10**18 for i,j in combinations(xy,2): x1,y1 = i x2,y2 = j px = (x1+x2)/2 py = (y1+y2)/2 r = math.hypot(x1-x2,y1-y2)/2 if judge(r,px,py): ans = min(ans,r) for i,j,k in combinations(xy,3): r,px,py = enc(i,j,k) if judge(r,px,py): ans = min(ans,r) print(ans)
import math from itertools import combinations n = int(input()) xy = [list(map(int,input().split())) for i in range(n)] def enc(i,j,k): a,b = i c,d = j e,f = k aa = a*a bb = b*b cc = c*c dd = d*d ee = e*e ff = f*f if (2*(e-a)*(b-d)-2*(c-a)*(b-f)) == 0: ymax = max(b,d,f) ymin = min(b,d,f) xmax = max(a,c,e) xmin = min(a,c,e) (px,py) = ((xmax-xmin)/2,(ymax-ymin)/2) r = math.hypot(xmax-xmin,ymax-ymin)/2 else: py = ((e-a)*(aa+bb-cc-dd)-(c-a)*(aa+bb-ee-ff))/(2*(e-a)*(b-d)-2*(c-a)*(b-f)) px = (2*(b-f)*py-aa-bb+ee+ff)/(2*(e-a))\ if (c == a) else (2*(b-d)*py-aa-bb+cc+dd)/(2*(c-a)) r = math.hypot(px-a, py-b) return (r,px,py) def judge(r,px,py): ls = [math.hypot(px-x,py-y) for x,y in xy] if max(ls) <= r+10**-7: return True else: return False ans = 10**18 for i,j in combinations(xy,2): x1,y1 = i x2,y2 = j px = (x1+x2)/2 py = (y1+y2)/2 r = math.hypot(x1-x2,y1-y2)/2 if judge(r,px,py): ans = min(ans,r) for i,j,k in combinations(xy,3): r,px,py = enc(i,j,k) if judge(r,px,py): ans = min(ans,r) print(ans)
[ "control_flow.branch.if.condition.change" ]
622,773
622,774
u905582793
python
p02805
import math from itertools import combinations n = int(input()) xy = [list(map(int,input().split())) for i in range(n)] def enc(i,j,k): a,b = i c,d = j e,f = k aa = a * a bb = b * b cc = c * c dd = d * d ee = e * e ff = f * f if (2 * (e - a)*(b - d) - 2 * (c - a) * (b - f)) == 0: ymax = max(b,d,f) ymin = min(b,d,f) xmax = max(a,c,e) xmin = min(a,c,e) (px,py) = ((xmax-xmin)/2,(ymax-ymin)/2) r = math.hypot(xmax-xmin,ymax-ymin)/2 else: py = ((e - a) * (aa + bb - cc - dd) - (c - a) * (aa + bb - ee- ff)) / (2 * (e - a)*(b - d) - 2 * (c - a) * (b - f)) px = (2 * (b - f) * py - aa - bb + ee + ff) / (2 * (e - a)) \ if (c == a) else (2 * (b - d) * py - aa - bb + cc + dd) / (2 * (c - a)) r = math.hypot(px - a, py - b) return (r,px,py) def judge(r,px,py): ls = [math.hypot(px-x,py-y) for x,y in xy] if max(ls) <= r: return True else: return False ans = 10**18 for i,j in combinations(xy,2): x1,y1 = i x2,y2 = j px = (x1+x2)/2 py = (y1+y2)/2 r = math.hypot(x1-x2,y1-y2)/2 if judge(r,px,py): ans = min(ans,r) for i,j,k in combinations(xy,3): r,px,py = enc(i,j,k) if judge(r,px,py): ans = min(ans,r) print(ans)
import math from itertools import combinations n = int(input()) xy = [list(map(int,input().split())) for i in range(n)] def enc(i,j,k): a,b = i c,d = j e,f = k aa = a * a bb = b * b cc = c * c dd = d * d ee = e * e ff = f * f if (2 * (e - a)*(b - d) - 2 * (c - a) * (b - f)) == 0: ymax = max(b,d,f) ymin = min(b,d,f) xmax = max(a,c,e) xmin = min(a,c,e) (px,py) = ((xmax-xmin)/2,(ymax-ymin)/2) r = math.hypot(xmax-xmin,ymax-ymin)/2 else: py = ((e - a) * (aa + bb - cc - dd) - (c - a) * (aa + bb - ee- ff)) / (2 * (e - a)*(b - d) - 2 * (c - a) * (b - f)) px = (2 * (b - f) * py - aa - bb + ee + ff) / (2 * (e - a)) \ if (c == a) else (2 * (b - d) * py - aa - bb + cc + dd) / (2 * (c - a)) r = math.hypot(px - a, py - b) return (r,px,py) def judge(r,px,py): ls = [math.hypot(px-x,py-y) for x,y in xy] if max(ls) <= r+10**-7: return True else: return False ans = 10**18 for i,j in combinations(xy,2): x1,y1 = i x2,y2 = j px = (x1+x2)/2 py = (y1+y2)/2 r = math.hypot(x1-x2,y1-y2)/2 if judge(r,px,py): ans = min(ans,r) for i,j,k in combinations(xy,3): r,px,py = enc(i,j,k) if judge(r,px,py): ans = min(ans,r) print(ans)
[ "control_flow.branch.if.condition.change" ]
622,773
622,775
u905582793
python
p02805
import sys; input = sys.stdin.buffer.readline from collections import defaultdict import math con = 10 ** 9 + 7; INF = float("inf") def getlist(): return list(map(int, input().split())) def ccw(ax, ay, bx, by, cx, cy): x1 = bx - ax; y1 = by - ay x2 = cx - ax; y2 = cy - ay cross = x1 * y2 - x2 * y1 if cross > 0: return 1 elif cross < 0: return - 1 else: return 0 class triangle(object): def __init__(self, Ax, Ay, Bx, By, Cx, Cy): self.a = ((Cx - Bx) ** 2 + (Cy - By) ** 2) ** 0.5 self.b = ((Ax - Cx) ** 2 + (Ay - Cy) ** 2) ** 0.5 self.c = ((Bx - Ax) ** 2 + (By - Ay) ** 2) ** 0.5 self.alpha = math.acos((self.b ** 2 + self.c ** 2 - self.a ** 2) / (2 * self.b * self.c)) self.preA = (self.a ** 2) * (self.b ** 2 + self.c ** 2 - self.a ** 2) self.preB = (self.b ** 2) * (self.c ** 2 + self.a ** 2 - self.b ** 2) self.preC = (self.c ** 2) * (self.a ** 2 + self.b ** 2 - self.c ** 2) self.Rx = (self.preA * Ax + self.preB * Bx + self.preC * Cx) / (self.preA + self.preB + self.preC) self.Ry = (self.preA * Ay + self.preB * By + self.preC * Cy) / (self.preA + self.preB + self.preC) self.R = self.a / (2 * math.sin(self.alpha)) def dist(Ax, Ay, Bx, By): return (((Ax - Bx) ** 2 + (Ay - By) ** 2) ** 0.5) def judge(N, node, R, Rx, Ry): jud = "Yes" for i in range(N): x = node[i][0]; y = node[i][1] if dist(Rx, Ry, x, y) > R: jud = "No" if jud == "Yes": return R else: return INF #処理内容 def main(): N = int(input()) node = [] for i in range(N): x, y = getlist() node.append([x, y]) if N == 2: R = dist(node[0][0], node[0][1], node[1][0], node[1][1]) / 2 print(R) return ans = INF #2点を直径とする円 for i in range(N): for j in range(i + 1, N): Rx = (node[i][0] + node[j][0]) / 2 Ry = (node[i][1] + node[j][1]) / 2 R = dist(node[i][0], node[i][1], node[j][0], node[j][1]) / 2 ans = min(ans, judge(N, node, R, Rx, Ry)) #3点を通る外接円 for i in range(N): for j in range(i + 1, N): for k in range(j + 1, N): x1 = node[i][0]; y1 = node[i][1] x2 = node[j][0]; y2 = node[j][1] x3 = node[k][0]; y3 = node[k][1] if ccw(x1, y1, x2, y2, x3, y3) == 0: continue T = triangle(x1, y1, x2, y2, x3, y3) Rx = T.Rx; Ry = T.Ry; R = T.R ans = min(ans, judge(N, node, R, Rx, Ry)) print(ans) if __name__ == '__main__': main()
import sys; input = sys.stdin.buffer.readline from collections import defaultdict import math con = 10 ** 9 + 7; INF = float("inf") def getlist(): return list(map(int, input().split())) def ccw(ax, ay, bx, by, cx, cy): x1 = bx - ax; y1 = by - ay x2 = cx - ax; y2 = cy - ay cross = x1 * y2 - x2 * y1 if cross > 0: return 1 elif cross < 0: return - 1 else: return 0 class triangle(object): def __init__(self, Ax, Ay, Bx, By, Cx, Cy): self.a = ((Cx - Bx) ** 2 + (Cy - By) ** 2) ** 0.5 self.b = ((Ax - Cx) ** 2 + (Ay - Cy) ** 2) ** 0.5 self.c = ((Bx - Ax) ** 2 + (By - Ay) ** 2) ** 0.5 self.alpha = math.acos((self.b ** 2 + self.c ** 2 - self.a ** 2) / (2 * self.b * self.c)) self.preA = (self.a ** 2) * (self.b ** 2 + self.c ** 2 - self.a ** 2) self.preB = (self.b ** 2) * (self.c ** 2 + self.a ** 2 - self.b ** 2) self.preC = (self.c ** 2) * (self.a ** 2 + self.b ** 2 - self.c ** 2) self.Rx = (self.preA * Ax + self.preB * Bx + self.preC * Cx) / (self.preA + self.preB + self.preC) self.Ry = (self.preA * Ay + self.preB * By + self.preC * Cy) / (self.preA + self.preB + self.preC) self.R = self.a / (2 * math.sin(self.alpha)) def dist(Ax, Ay, Bx, By): return (((Ax - Bx) ** 2 + (Ay - By) ** 2) ** 0.5) def judge(N, node, R, Rx, Ry): jud = "Yes" for i in range(N): x = node[i][0]; y = node[i][1] if dist(Rx, Ry, x, y) > R + 0.00001: jud = "No" if jud == "Yes": return R else: return INF #処理内容 def main(): N = int(input()) node = [] for i in range(N): x, y = getlist() node.append([x, y]) if N == 2: R = dist(node[0][0], node[0][1], node[1][0], node[1][1]) / 2 print(R) return ans = INF #2点を直径とする円 for i in range(N): for j in range(i + 1, N): Rx = (node[i][0] + node[j][0]) / 2 Ry = (node[i][1] + node[j][1]) / 2 R = dist(node[i][0], node[i][1], node[j][0], node[j][1]) / 2 ans = min(ans, judge(N, node, R, Rx, Ry)) #3点を通る外接円 for i in range(N): for j in range(i + 1, N): for k in range(j + 1, N): x1 = node[i][0]; y1 = node[i][1] x2 = node[j][0]; y2 = node[j][1] x3 = node[k][0]; y3 = node[k][1] if ccw(x1, y1, x2, y2, x3, y3) == 0: continue T = triangle(x1, y1, x2, y2, x3, y3) Rx = T.Rx; Ry = T.Ry; R = T.R ans = min(ans, judge(N, node, R, Rx, Ry)) print(ans) if __name__ == '__main__': main()
[ "control_flow.branch.if.condition.change", "control_flow.loop.for.condition.change" ]
622,779
622,780
u627417051
python
p02805
import sys; input = sys.stdin.buffer.readline from collections import defaultdict import math con = 10 ** 9 + 7; INF = float("inf") def getlist(): return list(map(int, input().split())) def ccw(ax, ay, bx, by, cx, cy): x1 = bx - ax; y1 = by - ay x2 = cx - ax; y2 = cy - ay cross = x1 * y2 - x2 * y1 if cross > 0: return 1 elif cross < 0: return - 1 else: return 0 class triangle(object): def __init__(self, Ax, Ay, Bx, By, Cx, Cy): self.a = ((Cx - Bx) ** 2 + (Cy - By) ** 2) ** 0.5 self.b = ((Ax - Cx) ** 2 + (Ay - Cy) ** 2) ** 0.5 self.c = ((Bx - Ax) ** 2 + (By - Ay) ** 2) ** 0.5 self.alpha = math.acos((self.b ** 2 + self.c ** 2 - self.a ** 2) / (2 * self.b * self.c)) self.preA = (self.a ** 2) * (self.b ** 2 + self.c ** 2 - self.a ** 2) self.preB = (self.b ** 2) * (self.c ** 2 + self.a ** 2 - self.b ** 2) self.preC = (self.c ** 2) * (self.a ** 2 + self.b ** 2 - self.c ** 2) self.Rx = self.preA * Ax + self.preB * Bx + self.preC * Cx / (self.preA + self.preB + self.preC) self.Ry = self.preA * Ay + self.preB * By + self.preC * Cy / (self.preA + self.preB + self.preC) self.R = self.a / (2 * math.sin(self.alpha)) def dist(Ax, Ay, Bx, By): return (((Ax - Bx) ** 2 + (Ay - By) ** 2) ** 0.5) def judge(N, node, R, Rx, Ry): jud = "Yes" for i in range(N): x = node[i][0]; y = node[i][1] if dist(Rx, Ry, x, y) > R + 0.000001: jud = "No" if jud == "Yes": return R else: return INF #処理内容 def main(): N = int(input()) node = [] for i in range(N): x, y = getlist() node.append([x, y]) if N == 2: R = dist(node[0][0], node[0][1], node[1][0], node[1][1]) / 2 print(R) return ans = INF #2点を直径とする円 for i in range(N): for j in range(i + 1, N): Rx = (node[i][0] + node[j][0]) / 2 Ry = (node[i][1] + node[j][1]) / 2 R = dist(node[i][0], node[i][1], node[j][0], node[j][1]) / 2 ans = min(ans, judge(N, node, R, Rx, Ry)) #3点を通る外接円 for i in range(N): for j in range(i + 1, N): for k in range(j + 1, N): x1 = node[i][0]; y1 = node[i][1] x2 = node[j][0]; y2 = node[j][1] x3 = node[k][0]; y3 = node[k][1] if ccw(x1, y1, x2, y2, x3, y3) == 0: continue T = triangle(x1, y1, x2, y2, x3, y3) Rx = T.Rx; Ry = T.Ry; R = T.R ans = min(ans, judge(N, node, R, Rx, Ry)) print(ans) if __name__ == '__main__': main()
import sys; input = sys.stdin.buffer.readline from collections import defaultdict import math con = 10 ** 9 + 7; INF = float("inf") def getlist(): return list(map(int, input().split())) def ccw(ax, ay, bx, by, cx, cy): x1 = bx - ax; y1 = by - ay x2 = cx - ax; y2 = cy - ay cross = x1 * y2 - x2 * y1 if cross > 0: return 1 elif cross < 0: return - 1 else: return 0 class triangle(object): def __init__(self, Ax, Ay, Bx, By, Cx, Cy): self.a = ((Cx - Bx) ** 2 + (Cy - By) ** 2) ** 0.5 self.b = ((Ax - Cx) ** 2 + (Ay - Cy) ** 2) ** 0.5 self.c = ((Bx - Ax) ** 2 + (By - Ay) ** 2) ** 0.5 self.alpha = math.acos((self.b ** 2 + self.c ** 2 - self.a ** 2) / (2 * self.b * self.c)) self.preA = (self.a ** 2) * (self.b ** 2 + self.c ** 2 - self.a ** 2) self.preB = (self.b ** 2) * (self.c ** 2 + self.a ** 2 - self.b ** 2) self.preC = (self.c ** 2) * (self.a ** 2 + self.b ** 2 - self.c ** 2) self.Rx = (self.preA * Ax + self.preB * Bx + self.preC * Cx) / (self.preA + self.preB + self.preC) self.Ry = (self.preA * Ay + self.preB * By + self.preC * Cy) / (self.preA + self.preB + self.preC) self.R = self.a / (2 * math.sin(self.alpha)) def dist(Ax, Ay, Bx, By): return (((Ax - Bx) ** 2 + (Ay - By) ** 2) ** 0.5) def judge(N, node, R, Rx, Ry): jud = "Yes" for i in range(N): x = node[i][0]; y = node[i][1] if dist(Rx, Ry, x, y) > R + 0.00001: jud = "No" if jud == "Yes": return R else: return INF #処理内容 def main(): N = int(input()) node = [] for i in range(N): x, y = getlist() node.append([x, y]) if N == 2: R = dist(node[0][0], node[0][1], node[1][0], node[1][1]) / 2 print(R) return ans = INF #2点を直径とする円 for i in range(N): for j in range(i + 1, N): Rx = (node[i][0] + node[j][0]) / 2 Ry = (node[i][1] + node[j][1]) / 2 R = dist(node[i][0], node[i][1], node[j][0], node[j][1]) / 2 ans = min(ans, judge(N, node, R, Rx, Ry)) #3点を通る外接円 for i in range(N): for j in range(i + 1, N): for k in range(j + 1, N): x1 = node[i][0]; y1 = node[i][1] x2 = node[j][0]; y2 = node[j][1] x3 = node[k][0]; y3 = node[k][1] if ccw(x1, y1, x2, y2, x3, y3) == 0: continue T = triangle(x1, y1, x2, y2, x3, y3) Rx = T.Rx; Ry = T.Ry; R = T.R ans = min(ans, judge(N, node, R, Rx, Ry)) print(ans) if __name__ == '__main__': main()
[ "literal.number.float.change", "control_flow.branch.if.condition.change" ]
622,781
622,780
u627417051
python
p02805
import sys INF = 1 << 60 MOD = 10**9 + 7 # 998244353 sys.setrecursionlimit(2147483647) input = lambda:sys.stdin.readline().rstrip() def resolve(): n = int(input()) C = [complex(*map(int, input().split())) for _ in range(n)] res = INF for k in range(n): p1 = C[k] for j in range(k): p2 = C[j] for i in range(j): p3 = C[i] a = abs(p2 - p3) ** 2 b = abs(p3 - p1) ** 2 c = abs(p1 - p2) ** 2 numerator = a * (b + c - a) * p1 + b * (c + a - b) * p2 + c * (a + b - c) * p3 denominator = a * (b* + c - a) + b * (c + a - b) + c * (a + b - c) if denominator == 0.0: continue center = numerator / denominator radius = -INF for p in C: radius = max(radius, abs(center - p)) res = min(radius, res) for j in range(n): for i in range(n): center = (C[i] + C[j]) / 2 radius = -INF for p in C: radius = max(radius, abs(center - p)) res = min(radius, res) print(res) resolve()
import sys INF = 1 << 60 MOD = 10**9 + 7 # 998244353 sys.setrecursionlimit(2147483647) input = lambda:sys.stdin.readline().rstrip() def resolve(): n = int(input()) C = [complex(*map(int, input().split())) for _ in range(n)] res = INF for k in range(n): p1 = C[k] for j in range(k): p2 = C[j] for i in range(j): p3 = C[i] a = abs(p2 - p3) ** 2 b = abs(p3 - p1) ** 2 c = abs(p1 - p2) ** 2 numerator = a * (b + c - a) * p1 + b * (c + a - b) * p2 + c * (a + b - c) * p3 denominator = a * (b + c - a) + b * (c + a - b) + c * (a + b - c) if denominator == 0.0: continue center = numerator / denominator radius = -INF for p in C: radius = max(radius, abs(center - p)) res = min(radius, res) for j in range(n): for i in range(n): center = (C[i] + C[j]) / 2 radius = -INF for p in C: radius = max(radius, abs(center - p)) res = min(radius, res) print(res) resolve()
[]
622,789
622,790
u440566786
python
p02805
N=int(input()) XY=[list(map(int,input().split())) for i in range(N)] from itertools import combinations a=9999 def f(X,Y,R2,a): if not any([(X-x)**2+(Y-y)**2>R2 for x,y in XY]): a=min(a,R2**.5) return a for (x1,y1),(x2,y2),(x3,y3) in combinations(XY,3): e1=(x2-x3)**2+(y2-y3)**2 e2=(x3-x1)**2+(y3-y1)**2 e3=(x1-x2)**2+(y1-y2)**2 p=e1*(e2+e3-e1) q=e2*(e3+e1-e2) r=e3*(e1+e2-e3) if p+q+r==0:continue X=(p*x1+q*x2*r*x3)/(p+q+r) Y=(p*y1+q*y2+r*y3)/(p+q+r) R2=(X-x1)**2+(Y-y1)**2+10e-15 a=f(X,Y,R2,a) for (x1,y1),(x2,y2) in combinations(XY,2): X=(x1+x2)/2 Y=(y1+y2)/2 R2=(X-x1)**2+(Y-y1)**2+10e-15 a=f(X,Y,R2,a) print(a)
N=int(input()) XY=[list(map(int,input().split())) for i in range(N)] from itertools import combinations a=9999 def f(X,Y,R2,a): if all([(X-x)**2+(Y-y)**2<R2 for x,y in XY]): a=min(a,R2**.5) return a for (x1,y1),(x2,y2),(x3,y3) in combinations(XY,3): e1=(x2-x3)**2+(y2-y3)**2 e2=(x3-x1)**2+(y3-y1)**2 e3=(x1-x2)**2+(y1-y2)**2 p=e1*(e2+e3-e1) q=e2*(e3+e1-e2) r=e3*(e1+e2-e3) if p+q+r==0:continue X=(p*x1+q*x2+r*x3)/(p+q+r) Y=(p*y1+q*y2+r*y3)/(p+q+r) R2=(X-x1)**2+(Y-y1)**2+10e-9 a=f(X,Y,R2,a) for (x1,y1),(x2,y2) in combinations(XY,2): X=(x1+x2)/2 Y=(y1+y2)/2 R2=(X-x1)**2+(Y-y1)**2+10e-9 a=f(X,Y,R2,a) print(a)
[ "control_flow.branch.if.condition.change", "misc.opposites", "expression.operator.compare.change", "expression.operator.arithmetic.change", "assignment.value.change", "expression.operation.binary.change", "literal.number.float.change" ]
622,817
622,818
u509368316
python
p02818
# your code goes here a,b,c=map(int,input().split()) if a==0 and b==0: print("0 0") elif a==0 and b>0: if b>c: print("0",b-c) elif c>=b: print("0 0") elif b==0 and a>0: if a>c: print(a-c,"0") elif c>=a: print("0 0") elif a+b==c: print("0 0") elif a>c: print(a-c,'',b) elif c>=a: i=c-a; if(b>i): j=b-i else: j=i-b print("0",j)
# your code goes here a,b,c=map(int,input().split()) if a==0 and b==0: print("0 0") elif a==0 and b>0: if b>c: print("0",b-c) elif c>=b: print("0 0") elif b==0 and a>0: if a>c: print(a-c,"0") elif c>=a: print("0 0") elif a+b==c: print("0 0") elif a>c: print(a-c,'',b) elif c>=a: i=c-a; if(b>i): j=b-i else: j=0 print("0",j)
[ "assignment.value.change", "identifier.replace.remove", "literal.replace.add", "expression.operation.binary.change", "expression.operation.binary.remove" ]
622,829
622,830
u586273727
python
p02818
A,B,K=map(int,input().split()) if A-K<=0: B=B+A-K A=0 if B<=0: B=0 if A-K>0: B=B-(A-K) A=A-K print(A,B)
A,B,K=map(int,input().split()) if A-K<=0: B=B+A-K A=0 if B<=0: B=0 if A-K>0: B=B A=A-K print(A,B)
[ "expression.operation.binary.remove" ]
622,831
622,832
u503294750
python
p02818
a,b,k=map(int,input().split()) cnt=0 if k>=(a+b): print("{} {}".format(0,0)) elif k>=a and k-a<=b: print("{} {}".format(0,b-k-a)) elif k<a: print("{} {}".format(a-k,b))
a,b,k=map(int,input().split()) cnt=0 if k>=(a+b): print("{} {}".format(0,0)) elif k>=a and k-a<=b: print("{} {}".format(0,b-k+a)) elif k<a: print("{} {}".format(a-k,b))
[ "misc.opposites", "expression.operator.arithmetic.change", "call.arguments.change", "expression.operation.binary.change", "io.output.change" ]
622,844
622,845
u061127257
python
p02818
a, b, k = [int(i) for i in input().split(' ')] if(k>a): k -= a a = 0 if(k>b): b = 0 else: b -= k print(str(a) + ' ' + str(b))
a, b, k = [int(i) for i in input().split(' ')] if(k>a): k -= a a = 0 if(k>b): b = 0 else: b -= k else: a -= k print(str(a) + ' ' + str(b))
[]
622,855
622,856
u278296307
python
p02818
in_li = list(map(int,input().split())) A = in_li[0] B = in_li[1] K = in_li[2] if A + B >= K : print("0 0") else : if A > K : print(A-K,"",B) elif B > K - A : print("0",B-(K-A))
in_li = list(map(int,input().split())) A = in_li[0] B = in_li[1] K = in_li[2] if A + B <= K : print("0 0") else : if A > K : print(A-K,"",B) elif B > K - A : print("0",B-(K-A))
[ "misc.opposites", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
622,863
622,864
u028733310
python
p02818
# -*- coding: utf-8 -*- A, B, K=map(int, input().split()) if K >= A: K1 = K - A A = 0 if K1 >= B: B = 0 else: B = B - K1 else: A = K - A print(A, B)
# -*- coding: utf-8 -*- A, B, K=map(int, input().split()) if K >= A: K1 = K - A A = 0 if K1 >= B: B = 0 else: B = B - K1 else: A = A - K print(A, B)
[ "expression.operation.binary.remove" ]
622,869
622,870
u662062459
python
p02818
A,B,K = map(int, input().split()) if A >= K: A = A - K if A < K: B = B - K + A A = 0 if B < 0: B = 0 print(A,B)
A,B,K = map(int, input().split()) if A >= K: A = A - K elif A < K: B = B - K + A A = 0 if B < 0: B = 0 print(A,B)
[ "control_flow.branch.if.replace.remove", "control_flow.branch.else_if.replace.add" ]
622,884
622,885
u528793636
python
p02818
a, b, k = map(int, input().split()) if a >= k: print(a - k, b) else: print(0, b - (k - a))
a, b, k = map(int, input().split()) if a >= k: print(a - k, b) else: print(0, max(0, b - (k - a)))
[ "call.arguments.add", "call.arguments.change" ]
622,890
622,891
u340781749
python
p02818
[a, b, k] = [int(x) for x in input().split()] if a>=k: a=a-k else: a=0 k=k-a if b>=k: b=b-k else: b=0 print(int(a),int(b))
[a, b, k] = [int(x) for x in input().split()] if a>=k: a=a-k else: k=k-a a=0 if b>=k: b=b-k else: b=0 print(int(a),int(b))
[ "assignment.remove", "assignment.add" ]
622,892
622,893
u010462426
python
p02818
#!python3 def resolve(): A, B, K = map(int, input().rstrip().split()) if K < A: print(K- A, B) elif K < A + B: print(0, A + B -K) else: print(0, 0) if __name__ == "__main__": resolve()
#!python3 def resolve(): A, B, K = map(int, input().rstrip().split()) if K < A: print(A-K, B) elif K < A + B: print(0, A + B -K) else: print(0, 0) if __name__ == "__main__": resolve()
[ "expression.operation.binary.remove" ]
622,898
622,899
u348805958
python
p02818
A,B,K = map(int, input().split()) if A <= K: K = K - A else: print(0, B) exit() if B <= K: print(0, 0) else: print(0, B - K)
A,B,K = map(int, input().split()) if A < K: K = K - A else: print(A - K, B) exit() if B < K: print(0, 0) else: print(0, B - K)
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change", "identifier.replace.add", "literal.replace.remove", "call.arguments.change", "io.output.change" ]
622,909
622,910
u643797323
python
p02818
a,b,k=map(int,input()) if a+b<=k:print(0,0) elif a<=k:print(0,a+b-k) else:print(a-k,b)
a,b,k=map(int,input().split()) if a+b<=k:print(0,0) elif a<=k:print(0,a+b-k) else:print(a-k,b)
[ "call.add" ]
622,913
622,914
u170765582
python
p02818
A, B, K = map(int, input().split()) if A > K: print(A-K, B) elif A < K and (A + B) > K: print(0, A + B - K) else: print(0, 0)
A, B, K = map(int, input().split()) if A >= K: print(A-K, B) elif A < K and (A + B) > K: print(0, A + B - K) else: print(0, 0)
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
622,915
622,916
u861141787
python
p02818
a,b,c=map(int,input().split()) tmp=a-c if (tmp<=0): a=0 b=0 if b<-tmp else b+tmp else: a=a-tmp print (a, b)
a,b,c=map(int,input().split()) tmp=a-c if (tmp<=0): a=0 b=0 if b<-tmp else b+tmp else: a=tmp print (a, b)
[ "expression.operation.binary.remove" ]
622,919
622,920
u875028418
python
p02818
a,b,k=map(int,input().split()) if k>a+b: print('0 0') if k>a: print('0 {}'.format(b-k+a)) else: print('{} {}'.format(a-k,b))
a,b,k=map(int,input().split()) if k>a+b: print('0 0') elif k>a: print('0 {}'.format(b-k+a)) else: print('{} {}'.format(a-k,b))
[ "control_flow.branch.if.replace.remove", "control_flow.branch.else_if.replace.add" ]
622,923
622,924
u007808656
python
p02818
A,B,K=map(int,input().split()) if A>=K: print(str(A-k)+" "+str(B)) else: if A+B>=K: print("0 "+str(A+B-K)) else: print("0 0")
A,B,K=map(int,input().split()) if A>=K: print(str(A-K)+" "+str(B)) else: if A+B>=K: print("0 "+str(A+B-K)) else: print("0 0")
[ "identifier.change", "call.arguments.change", "expression.operation.binary.change", "io.output.change" ]
622,927
622,928
u051684204
python
p02818
a, b, k = map(int, input().split()) if a < k: k = k - a a = 0 else: k = k - a a = a - k if k < 0: k = 0 b = b - k if b < 0: b = 0 print("{}".format(a) + " {}".format(b))
a, b, k = map(int, input().split()) p = k if a < k: k = k - a a = 0 else: k = k - a a = a - p if k < 0: k = 0 b = b - k if b < 0: b = 0 print("{}".format(a) + " {}".format(b))
[ "assignment.value.change", "identifier.change", "expression.operation.binary.change" ]
622,935
622,936
u700705777
python
p02818
a,b,k = [int(i) for i in input().split()] if a-k>0: print(a-k,b) else: print(0,min(0,b-(k-a)))
a,b,k = [int(i) for i in input().split()] if a-k>0: print(a-k,b) else: print(0,max(0,b-(k-a)))
[ "misc.opposites", "identifier.change", "call.function.change", "call.arguments.change", "io.output.change" ]
622,947
622,948
u211706121
python
p02818
a,b,k = [int(i) for i in input().split()] if a-k>0: print(a-k,b) else: print(0,b-(k-a))
a,b,k = [int(i) for i in input().split()] if a-k>0: print(a-k,b) else: print(0,max(0,b-(k-a)))
[ "call.arguments.add", "call.arguments.change" ]
622,949
622,948
u211706121
python
p02818
cookies = [int(x) for x in input().split()] leftOver = cookies[0] - cookies[2] takahashi = max(0,leftOver) print(str(takahashi)+''+(str(cookies[1]) if takahashi > 0 else str(max(0,cookies[1] - abs(leftOver)))))
cookies = [int(x) for x in input().split()] leftOver = cookies[0] - cookies[2] takahashi = max(0, leftOver) print(str(takahashi)+ ' ' + (str(cookies[1]) if takahashi > 0 else str(max(0,cookies[1] - abs(leftOver)))))
[ "literal.string.change", "call.arguments.change", "expression.operation.binary.change", "io.output.change" ]
622,952
622,953
u213314609
python
p02818
cookies = [int(x) for x in input().split()] leftOver = cookies[0] - cookies[2] takahashi = max(0,leftOver) print(str(takahashi)+''+(str(cookies[1]) if takahashi > 0 else str(max(0,cookies[1] - abs(leftOver)))))
cookies = [int(x) for x in input().split()] leftOver = cookies[0] - cookies[2] takahashi = max(0, leftOver) print(str(takahashi)+ ' ' + (str(cookies[1]) if takahashi > 0 else str(max(0,cookies[1] - abs(leftOver)))))
[ "literal.string.change", "call.arguments.change", "expression.operation.binary.change", "io.output.change" ]
622,952
622,954
u213314609
python
p02818
A,B,K=list(map(int,input().split())) if A>=K: print(A-K,B) else: K-=A print(0,B-K)
A,B,K=list(map(int,input().split())) if A>=K: print(A-K,B) else: K-=A print(0,max(B-K,0))
[ "call.add", "call.arguments.add", "call.arguments.change" ]
622,955
622,956
u079022693
python
p02818
a,b,k = map(int, input().split()) if a>=k: print(a-k,b) elif k>=a+b: print(0,0) else: print(0,str(b-a+k))
a,b,k = map(int, input().split()) if a>=k: print(a-k,b) elif k>=a+b: print(0,0) else: print(0,str(b-k+a))
[ "expression.operation.binary.remove" ]
622,959
622,960
u717265305
python
p02818
a,b,k = (int(x) for x in input().split()) if k >= a : if k >= b : if a + b >= k : a1 = 0 b1 = b - k + a else : a1 = 0 b1 = 0 else : a1 = 0 b1 = b - k + a else : a1 = a - k print(a1,b1)
a,b,k = (int(x) for x in input().split()) if k >= a : if k >= b : if a + b >= k : a1 = 0 b1 = b - k + a else : a1 = 0 b1 = 0 else : a1 = 0 b1 = b - k + a else : a1 = a - k b1 = b print(a1,b1)
[ "assignment.add" ]
622,963
622,964
u000840710
python
p02818
a, b, k = map(int, input().split()) m = min(a, k) a -= m k -= m m = min(b, k) b -= k print(a, b)
a, b, k = map(int, input().split()) m = min(a, k) a -= m k -= m m = min(b, k) b -= m print(a, b)
[ "identifier.change" ]
622,978
622,979
u830390742
python
p02818
a,b,k = list(map(int, input().split())) if a >= k: print(a-k,b) if b >= k-a: print(0,b + (a - k)) print(0, 0)
a,b,k = list(map(int, input().split())) if a >= k: print(a-k,b) elif b >= k-a: print(0,b + (a - k)) else: print(0,0)
[ "control_flow.branch.if.replace.remove", "control_flow.branch.else_if.replace.add" ]
622,985
622,986
u545221414
python
p02818
a,b,k = map(int,input().split()) if a >= k: print(a-k,b) else: if a + b < k: print("0,0") else: print(0,b-(k-a))
a,b,k = map(int,input().split()) if a >= k: print(a-k,b) else: if a + b < k: print("0 0") else: print(0,b-(k-a))
[ "literal.string.change", "call.arguments.change", "io.output.change" ]
622,989
622,990
u806392288
python