s_id
stringlengths
10
10
p_id
stringlengths
6
6
u_id
stringlengths
10
10
date
stringlengths
10
10
language
stringclasses
1 value
original_language
stringclasses
11 values
filename_ext
stringclasses
1 value
status
stringclasses
1 value
cpu_time
stringlengths
1
5
memory
stringlengths
1
7
code_size
stringlengths
1
6
code
stringlengths
1
539k
s271391226
p03777
u425351967
1507654761
Python
Python (3.4.3)
py
Runtime Error
19
3064
480
N, K = [int(n) for n in input().split()] A = [int(n) for n in input().split()] A.sort() res = [] for n_ex in range(N): dp = [[False] * K for n in range(N+1)] dp[0][0] = True for n in range(N): for k in range(0, K): dp[n+1][k] = dp[n][k] if n != n_ex: for k in range(0, K - A[n]): if dp[n][k] == True: dp[n+1][k+A[n]] = True for k in range(K-A[n_ex], K): if dp[N][k] == True: res.append(n_ex) break print(N-len(res))
s172883549
p03777
u785205215
1506045350
Python
Python (3.4.3)
py
Runtime Error
17
3056
157
a,b = list(int(i) for i in input().split()) if a == 1: a = 14 if b == 1: b = 14 if a==b: print("Draw") else: print("Alice" if a>b else "Bob")
s679861206
p03777
u261886891
1505587724
Python
Python (3.4.3)
py
Runtime Error
18
2940
129
a, b = list(map(int, input().split())) if (a == 'H' and b == 'H') or (a == 'D' and b == 'D'): print('H') else: print('D')
s469881814
p03777
u150117535
1504892341
Python
PyPy3 (2.4.0)
py
Runtime Error
159
38256
119
a,b=[int(x) for x in input().split()] if (a=="H" and b="D") or (a=="D" and b=="H"): print("D") else: print("H")
s740983723
p03777
u364386647
1501882749
Python
Python (3.4.3)
py
Runtime Error
17
3060
276
W, a, b = map(int, input().split()) if a + W < b: print(b - a - W) elif a + W == b: print(0) elif (b < a + W) & (a < b): print(0) elif a == b: print(0) elif b < a: print(0) elif a == b + W: print(0) elif b + W < a: print(a - b - W) else: pass
s927026361
p03777
u364386647
1501882716
Python
Python (3.4.3)
py
Runtime Error
17
2940
238
if a + W < b: print(b - a - W) elif a + W = b: print(0) elif (b < a + W) & (a < b): print(0) elif a == b: print(0) elif b < a: print(0) elif a = b + W: print(0) elif b + W < a: print(a - b - W) else: pass
s765736220
p03777
u364386647
1501882480
Python
Python (3.4.3)
py
Runtime Error
18
3188
221
W, a, b = map(int, input().split()) if a + W < b: print(b - a - W) elif a + W = b: print(0) elif (b < a + W) & (a < b): print(0) elif a == b: print(0) elif b + W <= a: print(a - b - W) else: pass
s073226891
p03777
u594762426
1496522653
Python
Python (3.4.3)
py
Runtime Error
17
2940
53
if A == B: print("H") elif A != B: print("D")
s690965843
p03777
u667084803
1494489407
Python
Python (3.4.3)
py
Runtime Error
18
3064
845
import sys N,K=map(int, input().split()) a=list(map(int, input().split())) sum=0 for i in range(0,N): sum+=a[i] if sum<K:#全部不必要 print(N) sys.exit() if sum==K:#全部必要 print(0) sys.exit() a.sort() a.reverse() #K未満の最大の数字のラベルはどこ? l=N for i in range(N-1,-1,-1): if a[i]<K: l=i else: break if l==N: print(N) sys.exit() count=N #lまでの要素が必要か不要かチェック for i in range(0,l): sum=0 for j in range(l,N): if sum+a[j]<K: sum+=a[j] if sum+a[i]>=K:#必要ってことだ count-=1 #lからの要素は自分のことを抜かないといけないことに注意 for i in range(l,N): sum=0 b=a[:] C=b.pop(i) for j in range(l-1,N-1): if sum+b[j]<K: sum+=b[j] if sum+C>=K:#必要ってことだ count-=1 print(count)
s702094346
p03777
u879309973
1494322806
Python
Python (2.7.6)
py
Runtime Error
10
2568
93
W, a, b = map(int, raw_input().split()) print min(abs(b-a-W), abs(b-a), abs(b+W-a), abs(b-a))
s617216047
p03777
u474630266
1492661351
Python
Python (2.7.6)
py
Runtime Error
11
2568
110
if raw_input() == 'H': print 'H' if raw_input() == 'H' else 'D' else: print 'H' if raw_input() == 'D' else 'D'
s974530983
p03777
u474630266
1492661288
Python
Python (2.7.6)
py
Runtime Error
11
2568
78
if raw_input() == 'H': print raw_input() == 'H' else: print raw_input() == 'D'
s867228368
p03777
u939822134
1492182439
Python
Python (3.4.3)
py
Runtime Error
17
2940
133
a, b = (int(i) for i in input().split()) #if a == "H" and b == "H" or a == "D" and b = "D": if a == b return "H" else: return "D"
s562240878
p03777
u432042540
1491714535
Python
Python (3.4.3)
py
Runtime Error
17
2940
87
W, a, b = [int(i) for i in input().split()] if a > b: a, b = b, a print(b-(a+W))
s949758266
p03777
u272028993
1491696840
Python
Python (2.7.6)
py
Runtime Error
10
2568
103
a,b=raw_input().split() if (a=='H' and b='H') or (a=='D' and b=='D'): print 'H' else: print 'D'
s461221997
p03777
u048767201
1491613816
Python
Python (3.4.3)
py
Runtime Error
17
2940
196
a,b = map(char,input().split()) if a == 'H': if b = 'H': print('H') elif b == 'D': print('D') elif a == 'D': if b == 'H': print('D') elif b == 'D': print('H')
s847989800
p03777
u256823895
1491523840
Python
Python (2.7.6)
py
Runtime Error
10
2568
115
a,b = map(int, raw_input().split()) if a == "H": print b if a == "D": if b == "H": print "D" else: print "H"
s307629881
p03777
u580316060
1491316549
Python
Python (3.4.3)
py
Runtime Error
17
3064
1056
def whatIsMinNumber(X_copy,K): pickupNum = X_copy[len(X_copy)//2] X_rest = X[:] X_rest.remove(pickupNum) if can_do_number(X_rest,0,K-pickupNum,K-1): if len(X_copy) > 2: return whatIsMinNumber(X_copy[len(X_copy)//2+1:len(X_copy)],K) else: return pickupNum else: if len(X_copy) > 1: return whatIsMinNumber(X_copy[0:len(X_copy)//2],K) else: return pickupNum+1 def can_do_number(X,sum,min,max): if len(X) == 0: return False for i in range(0,len(X)): if min <= sum+X[i] <= max: return True elif min > sum+X[i]: X_rest = X[:] sum = sum + X_rest.pop(i) can_do_number(X_rest,sum,min,max) else: pass return False N,K = list(map(int, input().split())) X = list(map(int, input().split())) X = [6,20,10,4,3,10,25,2] N = X.pop(0) K = X.pop(0) X.sort(reverse = True) thenum = whatIsMinNumber(X[:],K) print(len(list(filter((lambda x:x<whatIsMinNumber(X[:],K)),X))))
s829633043
p03777
u580316060
1491313223
Python
Python (3.4.3)
py
Runtime Error
17
3064
1096
def whatIsMinNumber(X_copy,K): pickupNum = X_copy[len(X_copy)//2] X_rest = X[:] X_rest.remove(pickupNum) if can_do_number(X_rest,pickupNum,K,K+pickupNum-1): if len(X_copy) > 2: return whatIsMinNumber(X_copy[len(X_copy)//2+1:len(X_copy)],K) else: return pickupNum else: if len(X_copy) > 1: return whatIsMinNumber(X_copy[0:len(X_copy)//2],K) else: return pickupNum+1 def can_do_number(X,sum,min,max): #残りのカードがない場合はFalseを返す if len(X) == 0: return False #残りのカードで順番に調べる for i in range(0,len(X)): if min <= sum+X[i] <= max: return True elif min > sum+X[i]: X_rest = X[:] sum = sum + X_rest.pop(i) can_do_number(X_rest,sum,min,max) else: pass return False N,K = list(map(int, input().split())) X = list(map(int, input().split())) X.sort(reverse = True) thenum = whatIsMinNumber(X[:],K) print(len(list(filter((lambda x:x<thenum),X))))
s834724279
p03777
u580316060
1491258076
Python
Python (3.4.3)
py
Runtime Error
17
2940
183
X = int(input()) P = {0} i=1 while True: Q = {0} for p in P: Q.add(p+i) Q.add(p-i) P = P.union(Q) if X in P: print(i) break i = i+1
s055846004
p03777
u004797437
1490889835
Python
Python (3.4.3)
py
Runtime Error
17
2940
104
arg = input().split(' ') a = arg[0] b = arg[1]' if a=='D': b = 'D' if b=='H' else 'H' print(b)
s655425848
p03777
u004797437
1490889774
Python
Python (3.4.3)
py
Runtime Error
17
2940
117
x = abs(int(input())) total = 0 for i in range(x+1): total += i if total >= x: print(i) break
s053473961
p03777
u265689893
1490834514
Python
Python (3.4.3)
py
Runtime Error
18
3064
576
# -*- coding: utf-8 -*- import itertools N, K = map(int, input().split()) A = list(map(int, input().split())) unnec = 0 for i in range(0,N): B = list(A) v = B.pop(i) nec = False for j in range(len(B),0,-1): for l in list(itertools.combinations(B,j)): s = sum(l) #print("%s, %d, %d" % (str(l), s, v)) if s >= K: continue elif s + v >= K: nec = True break if nec == True: break if nec == False: unnec = unnec + 1 print(unnec)
s090013057
p03777
u705476214
1490056439
Python
Python (3.4.3)
py
Runtime Error
18
2940
65
a=input() b=input() if a !=b: print("H") else: print("D")
s569786419
p03777
u968073812
1489961701
Python
Python (2.7.6)
py
Runtime Error
10
2568
71
l = input().split() if l[0]==l[1]: return "H" else: return "D"
s263448729
p03777
u897575257
1489939917
Python
Python (3.4.3)
py
Runtime Error
18
3056
189
import math w, a, b = [int(i) for i in input().split()] if a+w < b: print(int(math.fabs(b-a-w))) elif b+w < a: print(int(math.fabs(b+w-a))) else: print(int(0))
s605863397
p03777
u622568141
1489892048
Python
Python (3.4.3)
py
Runtime Error
149
12408
395
import numpy as np from itertools import product as p N, K = map(int, input().split()) a = np.array(list(map(int, input().split()))) bs = np.array(list(p((True, False), repeat=N))) z = np.zeros(N, dtype=int) ids = np.arange(N) if sum(a) < K: print(0) else: for i in range(N): Si = sum(a[bs[i,:]]) if Si < K: continue for j in ids[bs[i,:]]: if Si - a[j] < K: z[j] = 1 print(N-sum(z))
s058739320
p03777
u622568141
1489891988
Python
Python (3.4.3)
py
Runtime Error
148
12408
395
import numpy as np from itertools import product as p N, K = map(int, input().split()) a = np.array(list(map(int, input().split()))) bs = np.array(list(p((True, False), repeat=N))) z = np.zeros(N, dtype=int) ids = np.arange(N) if sum(a) < K: print(0) else: for i in range(N): Si = sum(a[bs[i,:]]) if Si < K: continue for j in ids[bs[i,:]]: if Si - a[j] < K: z[j] = 1 print(N-sum(z))
s699661555
p03777
u608297208
1489890853
Python
Python (3.4.3)
py
Runtime Error
17
3064
605
import itertools N,K = map(int,input().split()) A = list(map(int,input().split())) A.sort() need = [] iranaiko = [] for a in A: if a >= K: need.append(a) elif a in need: need.append(a) elif a in iranaiko: pass else: z = 0 B = A[:] B.remove(a) fusoku = [K - i - 1 for i in range(a)] for bi,b in enumerate(B): if b >= K: break B = B[:bi + 1] for i in range(1,len(B) + 1): C = list(itertools.combinations(B,i)) for c in C: if sum(c) in fusoku: need.append(a) z = 1 break if z == 1: break if z == 0: iranaiko.append(a) print(N - len(need))
s848583915
p03777
u811388439
1489890661
Python
Python (3.4.3)
py
Runtime Error
17
3060
247
n_vec = list(map(int, input().split())) n1 = n_vec[0] n2 = n_vec[1] n3 = n_vec[2] def metricf1(w,a,b) : if (a+w < b) : return b-a-w elif (a-w <= b <= a+w) : return 0 else : return a-b-w print(metricf1(n1,n2,n3))
s331768118
p03777
u343489490
1489888729
Python
Python (2.7.6)
py
Runtime Error
10
2568
302
#coding:utf-8 x=int(raw_input()) # 1 # 一つの数字のみ # w, a, b =map(int,raw_input().split()) # 2 3 # 二つの数字 sums=0 for i in range(14145): sums += i # if x == place: # print sum # print i if sums < x: pass elif sums >= x: print i break
s185428469
p03777
u780663263
1489887421
Python
Python (3.4.3)
py
Runtime Error
17
3060
249
X = int(input()) dist = [0] prev_dist = [0] time = 0 while not X in dist: time += 1 for i in prev_dist: if not i+time in dist: dist.append(i+time) if not i-time in dist: dist.append(i-time) prev_dist = dist[:] print(time)
s471421008
p03777
u204637741
1489887109
Python
Python (3.4.3)
py
Runtime Error
17
2940
100
a, b=map(str,input().split()) if(a=="H"): print(b) else: if(b=="H"): print(D) else: print(H)
s303340434
p03777
u855566104
1489886530
Python
Python (3.4.3)
py
Runtime Error
18
2940
135
a = input() b = input() if a =="H": if b=="H": return "H" else: return "D" else: if b=="H": return "D" else: return "H"
s549552724
p03777
u330205771
1489886487
Python
Python (2.7.6)
py
Runtime Error
10
2568
81
a, b = map(int, raw_input().split()) if a == b: print 'H' else: print 'D'
s031774349
p03777
u204637741
1489886471
Python
Python (3.4.3)
py
Runtime Error
17
2940
99
a, b=map(str,input().split()) if(a=='H'): print(b) else: if(b=='H'): print(D) else: print(H)
s656001899
p03777
u855566104
1489886431
Python
Python (3.4.3)
py
Runtime Error
17
2940
179
def main(a,b): if a =="H": if b=="H": return "H" else: return "D" else: if b=="H": return "D" else: return "H" a = input() b = input() print(main(a,b))
s055649561
p03777
u855566104
1489886409
Python
Python (3.4.3)
py
Runtime Error
17
2940
181
def taskA(a,b): if a =="H": if b=="H": return "H" else: return "D" else: if b=="H": return "D" else: return "H" a = input() b = input() print(taskA(a,b))
s786371112
p03777
u008841386
1489886381
Python
Python (3.4.3)
py
Runtime Error
17
2940
187
l = map(int, raw_input().split()) A=l[0] B=l[1] if A=='H' and B=='H': print('H') elif A=='H'and B=='D': print('D') elif A=='D' and B=='H': print('D') else: print('H')
s636947161
p03777
u008841386
1489886284
Python
Python (3.4.3)
py
Runtime Error
17
2940
177
#l = raw_input().split() A=l[0] B=l[1] if A=='H' and B=='H': print('H') elif A=='H'and B=='D': print('D') elif A=='D' and B=='H': print('D') else: print('H')
s573369418
p03777
u855566104
1489886227
Python
Python (3.4.3)
py
Runtime Error
17
2940
150
def main(a,b): if a =="H": if b=="H": return "H" else: return "D" else: if b=="H": return "D" else: return "H" print(main(a,b))
s185437048
p03777
u008841386
1489886223
Python
Python (3.4.3)
py
Runtime Error
17
2940
189
#l = map(str, raw_input().split()) A=l[0] B=l[1] if A=='H' and B=='H': print('H') elif A=='H'and B=='D': print('D') elif A=='D' and B=='H': print('D') else: print('H')
s258181994
p03777
u952236873
1489886172
Python
Python (2.7.6)
py
Runtime Error
10
2568
119
a, b = raw_input.split() if a == "H": print b else: if b == "H": print "D" else: print "H"
s301135781
p03777
u855566104
1489886159
Python
Python (3.4.3)
py
Runtime Error
17
2940
147
def main(a,b): if a =="H": if b=="H": return "H" else: return "D" else: if b=="H": return "D" else: return "H" print(main())
s183020683
p03777
u008841386
1489886125
Python
Python (3.4.3)
py
Runtime Error
17
2940
187
l = map(int, raw_input().split()) A=l[0] B=l[1] if A=='H' and B=='H': print('H') elif A=='H'and B=='D': print('D') elif A=='D' and B=='H': print('D') else: print('H')
s214244110
p03777
u622568141
1489886068
Python
Python (3.4.3)
py
Runtime Error
17
2940
65
a, b = input().split() if a == b: print('H') else: print('D')s
s832173265
p03777
u477338551
1489885836
Python
Python (3.4.3)
py
Runtime Error
17
2940
213
def main(): w, a, b = map(int, input().split()) if a <= b <= a + w or b <= a <= b + w: print(0) else: print(min(abs(a + w - b), abs(b + w - a))) if __name__ == "__main__": main()
s101512754
p03777
u855566104
1489885821
Python
Python (3.4.3)
py
Runtime Error
17
2940
107
if a =="H": if b=="H": return "H" else: return "D" else: if b=="H": return "D" else: return "H"
s578701300
p03777
u140672616
1489885726
Python
Python (3.4.3)
py
Runtime Error
17
2940
103
a,b = input().split(' ') if a == "H": print(b) else if b == "H": print(a) else: print("H")
s304607561
p03777
u855566104
1489885696
Python
Python (3.4.3)
py
Runtime Error
17
2940
118
if a =="H": if b=="H": return "H" else: return "D" else: if b=="H": return "D" else: return "H"
s576369255
p03777
u140672616
1489885618
Python
Python (3.4.3)
py
Runtime Error
17
2940
100
a,b = input().split() if a == "H": print(b) else if b == "H": print(a) else: print("H")
s423371306
p03777
u224222244
1489885617
Python
Python (2.7.6)
py
Runtime Error
10
2568
235
# -*- coding: utf-8 -*- a, b = map(str, raw_input().split()) result = '' if a == ‘H’: if b== ‘H’: result = ‘H’ else: result = ‘D’ else: if b==‘H’ result=‘D’ else: result=‘H' # 出力 print result
s168934650
p03778
u005977014
1598628556
Python
Python (3.8.2)
py
Runtime Error
24
8744
155
W,a,b=map(int,input().split()) if b>a: if b-(a+W)==0: print(0) exit() print(b-(a+W)) else: if a-(b+W)==0: print(0) exit() print(a-(b+W))
s553289460
p03778
u075303794
1596082806
Python
Python (3.8.2)
py
Runtime Error
24
9152
57
W,a,b=map(int,input()) print(max(max(a,b)-W-min(a,b),0))
s035864186
p03778
u314089899
1594441554
Python
Python (3.8.2)
py
Runtime Error
24
8884
188
W,a,b = map(int, input().split()) if (a <= b <= a+W) or (a <= b+W <= a+W) or : print(0) else: if a+W < b: print(abs(b-(a+W))) elif b+W < a: print(abs(a-(b+W)))
s170539763
p03778
u247211039
1593961293
Python
Python (3.8.2)
py
Runtime Error
25
9020
76
W,a,b=map(int,input().split()) if a+W<b: print(b-(W+a)): else: print(0)
s996642623
p03778
u702018889
1592752979
Python
Python (3.8.2)
py
Runtime Error
24
8892
123
w,a,b=map(int,input().split()) if a+w<b: print(b-a-w) else: if a<=b+w and a+w>=b: print(0) else: print(a-b-w)
s350761141
p03778
u854992222
1592678129
Python
Python (3.8.2)
py
Runtime Error
19
8956
186
w, a, b = map(int, input().split()) if b + w < a: print(a - (b + w)) elif a <= b + w <= a + w: print(0): elif a <= b <= a + w: print(0) elif a + w < b: print(b- (a + w))
s732966042
p03778
u633450100
1591158203
Python
Python (3.4.3)
py
Runtime Error
17
2940
107
W,a,b = [int(i) for i input().split()] if a <= b and b <= a + W: print(0) else: print(min(b+W-a,b-a-W))
s994255997
p03778
u085334230
1590716539
Python
Python (3.4.3)
py
Runtime Error
17
2940
79
w,a,b = map(int,input().split()) if w+a => b: print(0) else: print(b-(a+w))
s398039143
p03778
u085334230
1590715689
Python
Python (3.4.3)
py
Runtime Error
16
2940
47
w,a,b = map(int,input().split()) print(b-(a+W))
s827725876
p03778
u922449550
1590712876
Python
Python (3.4.3)
py
Runtime Error
17
2940
132
W, a, b = map(int, input().split()) if a <= b <= a + W or a <= b + W <= a + W: prin(0) quit() print(abs(a+W - b), abs(b+w - a))
s903206696
p03778
u806403461
1590533986
Python
Python (3.4.3)
py
Runtime Error
17
2940
181
w, a, b = map(int, input().split()) if a <= b and b <= a + w: print(0) elif a <= b + w and b + w <= a + w elif b+w < a: print(a - (b+w)) elif a+w < b: print(b - (a+w))
s917667929
p03778
u811436126
1590458920
Python
Python (3.4.3)
py
Runtime Error
17
3060
256
w, a, b = map(int, input().split()) if b > a + w: print(b - a - w) elif b + w < a: print(a - b - w) else: print(0) w, a, b = map(int, input().split()) if b > a + w: print(b - a - w) elif b + w < a: print(a - b - w) else: print(0)
s046228582
p03778
u229621546
1590449252
Python
Python (3.4.3)
py
Runtime Error
149
14536
323
import numpy as np def main(): N = int(input()) A = list(map(int, input().split())) su = np.sum(A) av = su // N if su % N != 0: print(-1) return ans = N - 1 b = 0 c = 0 for a in A[0: -1]: b += a c += 1 if b == (c * av): ans -= 1 b = 0 c = 0 print(ans) main()
s464961364
p03778
u629350026
1589851957
Python
Python (3.4.3)
py
Runtime Error
17
2940
73
w,a,b=map(int,input().split()) print(min(abs(b-a-w),abs(a-b),abs(b+w-a))
s542897172
p03778
u017415492
1588860908
Python
Python (3.4.3)
py
Runtime Error
17
2940
74
w,a,b=map(str,input().split()) if (w+a)<b: print(b-w-a) else: print(0)
s731146773
p03778
u189479417
1587609642
Python
Python (3.4.3)
py
Runtime Error
18
2940
124
W, a, b = map(int,input().split()) if abs(a - b) <= W: print(0) else: print(min(abs(a - (b + W), abs(b - (a + W)))))
s229828737
p03778
u852790844
1586476555
Python
Python (3.4.3)
py
Runtime Error
18
2940
109
w, a, b = map(int,input()) ans = 0 if b+w < a: ans = a - (b+w) if a+w < b: ans = b - (a+w) print(ans)
s306352626
p03778
u238940874
1586115290
Python
Python (3.4.3)
py
Runtime Error
18
2940
183
,a,b=map(int,input().split()) if a<b: if b-(a+w) < 0: print(0) else: print(b-(a+w)) else: if a-(b+w) < 0: print(0) else: print(a-(b+w))
s363451382
p03778
u760961723
1585882873
Python
Python (3.4.3)
py
Runtime Error
17
2940
175
W, a, b = map(int,input().split()) if a+W<=b: print(b-(a+W)) elif (a<= b)and (b<(a+W)): print(b-a) elif ((a-W)<=b) and(b<a): print(a-b) elif (b<(a-W): print(a-(b+W))
s135132245
p03778
u396266329
1585357667
Python
Python (3.4.3)
py
Runtime Error
17
2940
69
import math W,a,b = map(int,input().split()) print(max(abs(a-b)-W),0)
s452480615
p03778
u396266329
1585357615
Python
Python (3.4.3)
py
Runtime Error
17
2940
57
W,a,b = map(int,input().split()) print(max(abs(a-b)-W),0)
s444493604
p03778
u016323272
1585061056
Python
Python (3.4.3)
py
Runtime Error
18
3060
138
W,a,b = map(int,input()) if a <= b <= a+W or a<= b+W <= a+W: print(0) elif a+W < b: print(b-(a+W)) elif b+W <a: print(a-(b+W))
s964657771
p03778
u075595666
1584017372
Python
Python (3.4.3)
py
Runtime Error
18
2940
151
W,a,b = [int(i) for i in input().split()] ans = 0 if a <= b <= a+w or b <= a <= b+w: print(ans) else: ans = min(abs(b-a-w),abs(a-b-w)) print(ans)
s508813643
p03778
u723721005
1583811194
Python
Python (3.4.3)
py
Runtime Error
18
2940
139
w=input() a=input() b=input() if a > b: t=a a=b b=t l1=a r1=a+w l2=b r2=b+w if l1 >= r2: print "0" else: print l2 - r1;
s559596632
p03778
u476418095
1583811122
Python
Python (3.4.3)
py
Runtime Error
17
2940
154
w=int(input()) a=int(input()) b=int(input()) if a > b: t=a a=b b=t l1=a r1=a+w l2=b r2=b+w if l1 >= r2: print "0" else: print l2 - r1;
s344492379
p03778
u247366051
1583811009
Python
Python (2.7.6)
py
Runtime Error
18
2820
152
w=int(input()) a=int(input()) b=int(input()) if a > b: t=a a=b b=t l1=a r1=a+w l2=b r2=b+w if l1 >= r2: print 0 else: print l2 - r1;
s752081516
p03778
u247366051
1583810831
Python
Python (2.7.6)
py
Runtime Error
12
2568
44
w=int(input()) a=int(input()) b=int(input())
s695644098
p03778
u247366051
1583810789
Python
Python (2.7.6)
py
Runtime Error
10
2568
79
w=int(input()) a=int(input()) b=int(input()) if a > b: t=a a=b b=t
s540331469
p03778
u247366051
1583810733
Python
Python (2.7.6)
py
Runtime Error
10
2568
103
w=int(input()) a=int(input()) b=int(input()) if a > b: t=a a=b b=t l1=a r1=a+w l2=b r2=b+w
s610388703
p03778
u426964396
1583810694
Python
Python (2.7.6)
py
Runtime Error
10
2568
152
w=int(input()) a=int(input()) b=int(input()) if a > b: t=a a=b b=t l1=a r1=a+w l2=b r2=b+w if l1 >= r2: print 0 else: print l2 - r1;
s534764655
p03778
u263933075
1583810651
Python
Python (2.7.6)
py
Runtime Error
11
2568
154
w=int(input()) a=int(input()) b=int(input()) if a > b: t=a a=b b=t l1=a r1=a+w l2=b r2=b+w if l1 >= r2: print "0" else: print l2 - r1;
s486273851
p03778
u757030836
1583246355
Python
Python (3.4.3)
py
Runtime Error
18
2940
199
w,a,b = map(int,input().split()) if a < b: if b-(a+w) >0: print(b-(a+w)) else: print(0) elif a==b: print(0) eif a>b: if a-(b+w) >0: print(a-(b+w)) else: print(0)
s776705062
p03778
u768559443
1582936276
Python
Python (3.4.3)
py
Runtime Error
17
2940
55
W,a,b=map(int,input().split()) print(min(abs(a-b)-w,0))
s852738654
p03778
u914330401
1582346762
Python
Python (3.4.3)
py
Runtime Error
17
2940
203
w, a, b = map(int, input().split()) ans = 0 if a < b: if a+w > b: ans = 0 else: ans = b - a+w else if a == b: ans = 0 else: if b+w > a: ans = 0 else: ans = a - b+w print(ans)
s546043043
p03778
u215315599
1578528361
Python
Python (3.4.3)
py
Runtime Error
21
3316
644
from collections import deque def bfs(): Q = deque() Q.append(0) #今の時刻 i = 1 while len(Q) > 0: x = Q.popleft() if x-i >= 0: T[i][x-i] = 1 if x-i == X: return i Q.append(x-i) if 0 <= x and x <= X: T[i][x] = 1 if x == X: return i Q.append(x) if x+i <= X: T[i][x+i] = 1 if x+i == X: return i Q.append(x+i) i += 1 X = int(input()) INF = 10**9 +1 #時刻iで座標jに到着できるかどうか T = [[0 for _ in range(X+1)] for _ in range(X**2)] T[0][0] = 1 print(bfs())
s374189590
p03778
u215315599
1578528228
Python
Python (3.4.3)
py
Runtime Error
20
3316
672
import sys from collections import deque def bfs(): Q = deque() Q.append(0) #今の時刻 i = 1 while len(Q) > 0: x = Q.popleft() print(x) if x-i >= 0: T[i][x-i] = 1 if x-i == X: return i Q.append(x-i) if 0 <= x and x <= X: T[i][x] = 1 if x == X: return i Q.append(x) if x+i <= X: T[i][x+i] = 1 if x+i == X: return i Q.append(x+i) i += 1 X = int(input()) INF = 10**9 +1 #時刻iで座標jに到着できるかどうか T = [[0 for _ in range(X+1)] for _ in range(X**2)] T[0][0] = 1 print(bfs())
s904846272
p03778
u215315599
1578528125
Python
Python (3.4.3)
py
Runtime Error
21
3316
661
from collections import deque def bfs(): Q = deque() Q.append(0) #今の時刻 i = 1 while len(Q) > 0: x = Q.popleft() print(x) if x-i >= 0: T[i][x-i] = 1 if x-i == X: return i Q.append(x-i) if 0 <= x and x <= X: T[i][x] = 1 if x == X: return i Q.append(x) if x+i <= X: T[i][x+i] = 1 if x+i == X: return i Q.append(x+i) i += 1 X = int(input()) INF = 10**9 +1 #時刻iで座標jに到着できるかどうか T = [[0 for _ in range(X+1)] for _ in range(X**2)] T[0][0] = 1 print(bfs())
s620589271
p03778
u417014669
1576770962
Python
Python (3.4.3)
py
Runtime Error
17
2940
65
w,a,b=map(int, input().split()) print(min(abs(a+w-b)),abs(a-b-w))
s063361525
p03778
u664394831
1576309616
Python
Python (3.4.3)
py
Runtime Error
17
2940
173
#include <iostream> using namespace std; int main() { int w, a, b; cin >> w >> a >> b; if (a > b) swap(a, b); cout << max(0, b - (a + w)) << endl; }
s975755630
p03778
u355371431
1574389142
Python
PyPy3 (2.4.0)
py
Runtime Error
170
38512
110
W,a,b = map(int,input().split()) if((abs(b-a) < W): print(0) else: ans = abs(b - a) - W print(ans)
s407330567
p03778
u117193815
1574386331
Python
Python (3.4.3)
py
Runtime Error
18
3060
132
w,a,b= map(int ,input().split()) if w>=a and b<=w+a: print(0) elif a+w<=b: print(b-(a+w)) elif b+w<a: print(a(-b+w))
s700893616
p03778
u117193815
1574386292
Python
Python (3.4.3)
py
Runtime Error
17
2940
129
w,a,b= map(int ,input().split()) if w>=a and b<=w+a: print(0) elif a+w<=b print(b-(a+w)) elif b+w<a: print(a(-b+w))
s407576121
p03778
u735069283
1573240053
Python
Python (3.4.3)
py
Runtime Error
17
2940
107
W,A,B = map(int,input().split()) if A <= B: a=A b=b else: a=B b=A print(b-a-W if a+W<b else int(0))
s687541927
p03778
u814986259
1572150788
Python
Python (3.4.3)
py
Runtime Error
17
2940
69
W,a,b=map(int,input().split()) print(min(max(W+a - b,0),max(a-W-b)))
s510160639
p03778
u153902122
1571967874
Python
Python (3.4.3)
py
Runtime Error
17
2940
147
W,a,b = map(int, input().split()) if (a<=b<=a+W): print(0) elif (a=<b+W<=a+W): print(0) elif a<=b: print(b-a-W) else: print(a-b-W)
s255606549
p03778
u883232818
1569546978
Python
Python (3.4.3)
py
Runtime Error
17
2940
131
W, a, b = map(int, input().split()) if a > b + W: print(a - (b + w)) elif b > a + W: print(b - (a + W)) else: print(0)
s317733903
p03778
u984529214
1569348047
Python
Python (3.4.3)
py
Runtime Error
18
3060
161
W_str=input() a_str=input() b_str=input() W=int(W_str) a=int(a_str) b=int(b_str) if a+W<b: print(b-(a+W)) elif b+W<a: print(a-(b+W)) else : print(0)
s476196865
p03778
u248670337
1565990504
Python
Python (3.4.3)
py
Runtime Error
18
3064
55
w,a,b=map(int,input().split()) print(max(abs(s-b)-w,0))