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
s149678917
p03803
u464912173
1565877216
Python
Python (3.4.3)
py
Runtime Error
17
2940
128
a, b = map(int, input().split()) if a == 1: a = 14 if b == 1: b = 14 print('Draw' if a=b elif 'Alice' a>b else 'Bob')
s843668796
p03803
u170077602
1565765753
Python
Python (3.4.3)
py
Runtime Error
17
3064
558
N,M=list(map(int,input().split())) a = [list(map(int,input().split())) for i in range(M)] seen = [-1 for i in range(N)] count = 0 def dfs(x): global count if sum(seen) == N: count += 1 return for i in range(M): if a[i][0] == x and seen[a[i][1]-1] == -1: seen[a[i][1]-1] = 1 dfs(a[i][1]) seen[a[i][1]-1] = -1 if a[i][1] == x and seen[a[i][0]-1] == -1: seen[a[i][0]-1] = 1 dfs(a[i][0]) seen[a[i][0]-1] = -1 seen[0] = 1 dfs(1) print(count)
s951121507
p03803
u379959788
1565707831
Python
Python (3.4.3)
py
Runtime Error
17
2940
299
#include <bits/stdc++.h> using namespace std; int main(){ int A, B; cin >> A >> B; if (A == B) cout << "Draw" << endl; else if (A == 1) cout << "Alice" << endl; else if (B == 1) cout << "Bob" << endl; else if (A > B) cout << "Alice" << endl; else cout << "Bob" << endl; }
s049094442
p03803
u282657760
1565641418
Python
Python (3.4.3)
py
Runtime Error
17
2940
193
A, B = map(int, input().split()) if A == B: print('Draw') else: if A == 1: print('Alice') elif B == 1: print('Bob') elif A < B: print('Bob') else B < A: print('Alice')
s713566240
p03803
u703890795
1565188084
Python
Python (3.4.3)
py
Runtime Error
17
3060
152
A = int(input()) B = int(input()) if A == 1: A = 14 if B == 1: B = 14 if A == B: print("Draw") elif A > B: print("Alice") else: print("Bob")
s830252297
p03803
u558059388
1565125392
Python
Python (3.4.3)
py
Runtime Error
17
2940
141
A,B=[int(x) for in x input().split()] if A==1: A=14 if B==1: B=14 if A>B: print('Alice') elif B>A: print('Bob') else: print('Drow')
s506161700
p03803
u558059388
1565125334
Python
Python (3.4.3)
py
Runtime Error
17
2940
141
A,B=[int(x) for in x input().split()] if A=1: A==14 if B=1: B==14 if A>B: print('Alice') elif B>A: print('Bob') else: print('Drow')
s291054267
p03803
u558059388
1565125134
Python
Python (3.4.3)
py
Runtime Error
17
2940
133
A,B=(int(x) forx in input.split()) if A=1: A==14 if B=1: B==14 if A>B: print('Alice') elif B>A: print('Bob') else: ('Drow')
s159405806
p03803
u558059388
1565124474
Python
Python (3.4.3)
py
Runtime Error
18
2940
137
1<=A<=13 1<=B<=13 if A > B >=2 or A=1 ,B >= 2 : print(Alice) elif B > A =2 or B=1 ,A >= 2: print(Bob) elif A = B: print(Draw)
s150580808
p03803
u229959388
1565106145
Python
Python (3.4.3)
py
Runtime Error
18
3060
163
a, b = map(int, input().split()) c = [13,1,2,3,4,5,6,7,8,9,10,11,12] if c[a] > c[b]: print('Alice') elif c[a] < c[b]: print('Bob') else: print('Draw')
s650665618
p03803
u897328029
1564939624
Python
Python (3.4.3)
py
Runtime Error
18
3064
590
import itertools n, m = list(map(int, input().split())) ab_list = [] for _ in range(0, m): a, b = list(map(int, input().split())) ab_list.append((a, b)) ab_list.append((b, a)) # 全探索で解く場合 l = range(1, n+1) count = 0 roots = [v for v in itertools.permutations(l, n) if v[0] == 1] for v in roots: is_ok = True for i, _ in enumerate(list(v)[:-1]): # 探索対象となるエッジ target_edge = (list(v)[i], list(v)[i+1]) if (target_edge not in ab_list): is_ok = False if is_ok: count += 1 print(count)
s285206408
p03803
u816631826
1564384570
Python
Python (3.4.3)
py
Runtime Error
17
2940
165
n = int(input()) m = int(input()) if n == 1: n = 14 if m == 1: m = 14 if n > m: print("Alice") elif m > n: print("Bob") else: print("Draw")
s615973105
p03803
u982594421
1564340092
Python
Python (3.4.3)
py
Runtime Error
17
3060
141
a, b = map(int, input()) if a == 1: a = 14 if b == 1: b = 14 if a > b: print('Alice') elif a == b: print('Draw') else: print('Bob')
s081134070
p03803
u982594421
1564339952
Python
Python (3.4.3)
py
Runtime Error
17
3060
143
a, b = map(int, input()) if a == 1: a == 14 if b == 1: b == 14 if a > b: print('Alice') elif a == b: print('Draw') else: print('Bob')
s194546074
p03803
u502389123
1564244334
Python
Python (3.4.3)
py
Runtime Error
18
3316
844
N, Ma, Mb = map(int, input().split()) a = [0] * N b = [0] * N c = [0] * N for i in range(N): a[i], b[i], c[i] = map(int, input().split()) INF = 10 ** 5 nums = 401 dp = [[[INF for _ in range(nums)] for _ in range(nums)] for _ in range(N+1)] dp[0][0][0] = 0 for i in range(N): for sum_a in range(nums): for sum_b in range(nums): if dp[i][sum_a][sum_b] == INF: continue dp[i+1][sum_a][sum_b] = min(dp[i+1][sum_a][sum_b], dp[i][sum_a][sum_b]) dp[i+1][sum_a+a[i]][sum_b+b[i]] = min(dp[i+1][sum_a+a[i]][sum_b+b[i]], dp[i][sum_a][sum_b] + c[i]) # print(i, dp[i][sum_a][sum_b], sum_a, sum_b) res = INF for i in range(1, nums): for j in range(1, nums): if i * Mb == j * Ma: res = min(res, dp[N][i][j]) if res == INF: res = -1 print(res)
s320121449
p03803
u888512581
1564073051
Python
Python (3.4.3)
py
Runtime Error
18
3064
404
N, M = map(int, input().split()) A = [list(input()) for i in range(N)] B = [list(input()) for i in range(M)] ans = 'No' for i in range(N - M +1): for j in range(N - M +1): count = 0 for row in range(M): for col in range(M): if B[row][col] == A[i + row][j + col]: count += 1 if count == M * M: ans = 'Yes' print(ans)
s142014923
p03803
u371409687
1563925664
Python
Python (3.4.3)
py
Runtime Error
18
3060
240
n,m=map(int,input().split()) i1=[input() for _ in range(n)] i2=[input() for _ in range(m)] ans="No" for i in range(n-m+1): for j in range(n-m+1): if i1[i][j:m+j]==i2[0] and i1[i+1][j:j+m]==i2[1]: ans="Yes" print(ans)
s614327136
p03803
u324549724
1563924970
Python
Python (3.4.3)
py
Runtime Error
17
2940
228
a, b = map(int, input().split()) if a == b : print('Draw') else : if min(a, b) == 1 : flag = True if a < b : if flag : print('Alice') else : print('Bob') else : if flag : print('Bob') else : print('Alice')
s934377804
p03803
u324549724
1563924904
Python
Python (3.4.3)
py
Runtime Error
17
2940
228
a, b = map(int, input().split()) if a == b : print('Draw') else : if min(a, b) == 1 : flag = TRUE if a < b : if flag : print('Alice') else : print('Bob') else : if flag : print('Bob') else : print('Alice')
s893888503
p03803
u797016134
1563496788
Python
Python (3.4.3)
py
Runtime Error
18
2940
116
a, b = map(int, input().split()) if a < b: print("Bob") if a > b: print("Alice") if a = b: print("Draw")
s407179307
p03803
u971091945
1563036884
Python
Python (3.4.3)
py
Runtime Error
17
2940
102
a,b=map(int, input().split()) if a>b: print(Alice) elif a<b: print(Bob) else: print(Drow)
s270539999
p03803
u093500767
1562195674
Python
Python (3.4.3)
py
Runtime Error
17
2940
142
a, b = input().stlip() if a==1: a = 14 if b==1: b = 14 if a>b: print("Alice") elif a<b: print("Bob") else: print("Draw")
s721036419
p03803
u093500767
1562195437
Python
Python (3.4.3)
py
Runtime Error
23
3060
152
a, b = map(int, input().stlip()) if a==1: a = 14 if b==1: b = 14 if a>b: print("Alice") elif a<b: print("Bob") else: print("Draw")
s669067317
p03803
u599925824
1562035225
Python
Python (3.4.3)
py
Runtime Error
17
3060
294
card_power = {'2':'1','3':'2','4':'3','5':'4','6':'5','7':'6','8':'7','9':'8','10':'9','11':'10','11':'12','13':'12','1':'13'} A,B = input().split() if int(card_power[A]) > int(card_power[B]): print('Alice') elif int(card_power[A]) < int(card_power[B]): print('Bob') else: print('Alice')
s866152122
p03803
u599925824
1562034989
Python
Python (3.4.3)
py
Runtime Error
18
3064
301
card_power = {'2':'0','2':'1','3':'2','4':'3','5':'4','6':'5','7':'6','8':'7','9':'8','10':'9','11':'10','11':'12','13':'12','1':'13'} A,B = input().split() if int(card_power[A]) > int(card_power[B]): print('Alice') elif int(card_power[A]) < int(card_power[B]): print('Bob') else: print('Draw')
s898369925
p03803
u288948615
1561940452
Python
Python (3.4.3)
py
Runtime Error
17
2940
158
A, B = map(int, input().split()) if A = 1: A += 12 if B = 1: B += 12 if A < B: print('Alice') if A > B: print('Bob') else: print('Draw')
s234129696
p03803
u288948615
1561940370
Python
Python (3.4.3)
py
Runtime Error
17
2940
105
A, B = map(int, input()) if A < B: print('Alice') if A > B: print('Bob') else: print('Draw')
s760840215
p03803
u790812284
1561442866
Python
Python (3.4.3)
py
Runtime Error
17
2940
116
a,b = int(input().split) if a ==b : print("Draw") elif a == 1 or a>b: print("Alice") else: print("Bob")
s758111884
p03803
u777923818
1561434674
Python
PyPy3 (2.4.0)
py
Runtime Error
175
38384
415
from itertools import combinations, permutations def inpl(): return list(map(int, input().split())) N, M = inpl() G = [[0]*(N+1) for _ in range(N+1)] for _ in range(M): a, b = inpl() G[a][b] = 1 G[b][a] = 1 ans = 0 for X in permutations(range(2, N+1)): a = 1 for i in range(N-1): b = X[i] if G[a][b] == 0: break a = b else: ans += 1 print(ans)
s546673668
p03803
u377989038
1561160436
Python
Python (3.4.3)
py
Runtime Error
17
2940
159
a, b = map(int, input().split()) if a == 1: a = 14 if: b == 1: b = 14 if a < b: print("Bob") elif a > b: print("Alice") else: print("Draw")
s783221001
p03803
u399721252
1560787949
Python
PyPy3 (2.4.0)
py
Runtime Error
168
38256
230
strength = [ str(i) for i in range(2,14) ] + ["1"] a , b = [ v for v in input().split() ] if a.index(strength) > b.index(strength): print("Alice") elif a.index(strength) == b.index(strength): print("Draw") else: print("Bob")
s464918572
p03803
u924308178
1560008437
Python
Python (3.4.3)
py
Runtime Error
18
2940
118
a,b = map(list(map,input().split(" "))) if a>b: print("Alice") elif a<b : print("Bob") else: print("Draw")
s704889541
p03803
u329058683
1559820226
Python
Python (3.4.3)
py
Runtime Error
17
2940
119
A,B=map(int,input().split()) if A==B: print("Draw") elif B>1 and A==1 or A>B: print(""Alice) else: print("Bob")
s041986800
p03803
u329058683
1559819955
Python
Python (3.4.3)
py
Runtime Error
18
2940
124
A,B=map(int,input().split()) if A>B or A==1 not B==1: print("Alice") elif A==B: print("Draw") else: print("Bob")
s718011852
p03803
u329058683
1559819548
Python
Python (3.4.3)
py
Runtime Error
17
2940
99
A,B=map(int,input().split()) if A>B: print("Alice") elif A==B: print(Draw) else: print("Bob")
s540702138
p03803
u977642052
1559565957
Python
Python (3.4.3)
py
Runtime Error
17
3060
273
A, B = map(int, input().split(' ')) def re_define(input_): '''強さ順にする''' if input_ == 1: return 13 return input_ - 1 A = re_define(A) B = re_define(B) if A > B: print('Alice') elif A < B: print('Bob') else: print('Draw') p
s297572414
p03803
u591764610
1558248633
Python
Python (3.4.3)
py
Runtime Error
17
2940
118
a,b=map(lambda x:14 if int(x)==1 else int(x),input().split()) if a>b:s='Alice';elif a<b:s='Bob';else:s='Draw';print(s)
s678245595
p03803
u977193988
1557932560
Python
Python (3.4.3)
py
Runtime Error
17
2940
199
A,B=map(int,input().split()) N=[2,3,4,5,6,7,8,9,10,11,12,13,1] if N.index(A)<N.index(B): print('Bob') elif N.index(A)>N.index(B): print('Alice') else N.index(A)==N.index(B): print('Draw')
s307309508
p03803
u374531474
1557261764
Python
Python (3.4.3)
py
Runtime Error
17
2940
138
A, B = map(int, input().split()) a = 14 if A == 1 else A b = 14 if b == 1 else B print('Alice' if a > b else 'Bob' if a < b else 'Draw')
s014645617
p03803
u507116804
1556741475
Python
Python (3.4.3)
py
Runtime Error
20
2940
166
a,b=map(int, input().split()) if a==1: k=14 else: k=a if b==1: m=14 else: m=b if k>m: print("Alice") elif k==m: print("Draw") else k<m: print("Bob")
s011117553
p03803
u507116804
1556741386
Python
Python (3.4.3)
py
Runtime Error
17
2940
170
a,b=map(int, input().split()) if a==1: a=14 else: a=a+0 if b==1: b=14 else: b=b+0 if a>b: print("Alice") elif a==b: print("Draw") else a<b: print("Bob")
s078694477
p03803
u507116804
1556741303
Python
Python (3.4.3)
py
Runtime Error
18
2940
166
a,b=map(int, input().split()) if a==1: a=14 else: a=a if b==1: b=14 else: b=b if a>b: print("Alice") elif a=b: print("Draw") else a<b: print("Bob")
s247504887
p03803
u432805419
1556674404
Python
Python (3.4.3)
py
Runtime Error
17
2940
155
a = list(input().split()) a.replace("1","99") if int(a[0]) > int(a[1]): print("Bob") elif int(a[0]) == int(a[1]): print("Draw") else: print("Alice")
s612458428
p03803
u432805419
1556674320
Python
Python (3.4.3)
py
Runtime Error
17
3060
139
a = list(map(int,input().split())) a.replace(1,99) if a[0] > a[1]: print("Bob") elif a[0] == a[1]: print("Draw") else: print("Alice")
s468605147
p03803
u432805419
1556674169
Python
Python (3.4.3)
py
Runtime Error
17
3060
111
a = list(map(int,input().split())) if a > b: print("Bob") elif a == b: print("Draw") else: print("Alice")
s056869094
p03803
u187205913
1556320675
Python
Python (3.4.3)
py
Runtime Error
17
2940
161
a,b = map(int,input().split()) if a==b: print('Draw') elif a==1: print('Alice') elif b==1 or : print('Bob') elif a>b: print('Alice') else: print('Bob')
s062200220
p03803
u151625340
1555963630
Python
Python (3.4.3)
py
Runtime Error
17
2940
202
A,B = int(input()) if A<B: if A == 1: print('Alice') else: print('Bob') elif A == B: print('Draw') else: if B == 1: print('Bob') else: print('Alice')
s340333644
p03803
u902693400
1555893656
Python
Python (3.4.3)
py
Runtime Error
17
2940
146
a,b= int(input().split()) if(a==1): a= 14 if(b==1): b= 14 if(a-b>0): print("Alice") elif(a-b< 0): print("Bob") else: print("Draw")
s648716804
p03803
u144980750
1555825105
Python
Python (3.4.3)
py
Runtime Error
17
2940
159
a,b=map(int,input().split()) if a==b: print("Draw") elif a==1: print("Alice") elif b==1: print("Bob") elif b<a: print("Alice") else a<b: print("Bob")
s380541818
p03803
u052499405
1555693669
Python
Python (3.4.3)
py
Runtime Error
17
2940
123
a, b = [int(item) for item in input().split()] if a > b: print("Alice") eiif a == b: print("Draw") else: print("Bob")
s590915675
p03803
u331464808
1555430862
Python
Python (3.4.3)
py
Runtime Error
17
2940
155
a,b=map(int,input().split()) if a==b: print('Draw') elif a==1 print('Alice') elif b==1 print('Bob') elif a > b: print('Alice') else: print('Bob')
s688880988
p03803
u331464808
1555430483
Python
Python (3.4.3)
py
Runtime Error
17
2940
151
a,b=map(int,input().split()) if a==b: print('Draw') elif a==1 print('Alice') elif b==1 print('Bob') elif a>b:print('Alice') elif a<b:print('Bob')
s294070791
p03803
u331464808
1555429918
Python
Python (3.4.3)
py
Runtime Error
17
2940
118
a,b=map(int,input().split()) if a=b: print('Draw') elif a=1 or a>b: print('Alice') elif b=1 or a<b: print('Bob')
s386873642
p03803
u331464808
1555429663
Python
Python (3.4.3)
py
Runtime Error
17
3064
152
a,b=map(int,input().split()) if a=b: print('Draw') elif a=1: print('Alice') elif b=1: print('Bob') elif a>b: print('Alice') else: print('Bob')
s359990142
p03803
u331464808
1555429014
Python
Python (3.4.3)
py
Runtime Error
17
2940
98
a,b=map(int,input().split()) if a>b: print('Alice') if a=b: print('Draw') else: print('Bob')
s695429084
p03803
u220345792
1555183864
Python
Python (3.4.3)
py
Runtime Error
17
2940
161
A, B = map(int, input()) if A == B: print("Draw") elif A == 1: print("Alice") elif B == 1: print("Bob") elif A > B : print("Alice") else: print("Bob")
s436490111
p03803
u288040231
1554713648
Python
Python (3.4.3)
py
Runtime Error
18
2940
103
A,B = int(input().split()) if A == B: print('Draw') elif A > B: print('Alice') else: print('Bob')
s286218796
p03803
u557523358
1554590681
Python
Python (3.4.3)
py
Runtime Error
17
2940
106
a, b = ((int(x) - 2) % 100 for x in input().split()) print('Draw' if a == b else 'Alice' a > b else 'Bob')
s954421482
p03803
u316386814
1554466251
Python
Python (3.4.3)
py
Runtime Error
24
3664
1124
import sys sys.setrecursionlimit(10**7) INF = 10 ** 18 MOD = 10 ** 9 + 7 def POW(x, y): if y == 0: return 1 elif y == 1: return x elif y % 2 == 0: return POW(x, y // 2) ** 2 % MOD else: return POW(x, y // 2) ** 2 * x % MOD def mod_factorial(x, y): return x * POW(y, MOD - 2) % MOD def LI(): return [int(x) for x in sys.stdin.readline().split()] def LI_(): return [int(x) - 1 for x in sys.stdin.readline().split()] def LF(): return [float(x) for x in sys.stdin.readline().split()] def LS(): return sys.stdin.readline().split() def II(): return int(sys.stdin.readline()) def SI(): return input() from functools import reduce def binomials(n, k): ret = [0] * (n + 1) ret[k] = 1 denomi = mod_factorial(1, reduce(lambda x, y: x * y % MOD, range(1, k), 1)) for i in range(k - 1, n): numeri = reduce(lambda x, y: x * y % MOD, range(i - k + 2, i + 1), 1) ret[i + 1] = numeri * denomi % MOD return ret def main(): if A > B: ans = 'Alice' elif A == B: ans = 'Draw' else: ans = 'Bob' return ans print(main())
s782878390
p03803
u748311048
1554304210
Python
Python (3.4.3)
py
Runtime Error
17
2940
204
A,B=map(int,input().split()) if A==1 or B==1: if A==B: print('Draw') elif A=1: print('Alice') else: print('Bob') elif A>B: print('Alice') elif A<B: print('Bob') else: print('Draw')
s792863349
p03803
u912862653
1554054837
Python
Python (3.4.3)
py
Runtime Error
17
2940
98
A, B = int(input()) if A==B: print('Draw') elif A>B or A==1: print('Alice') else: print('Bob')
s504461075
p03803
u923712635
1553673295
Python
Python (3.4.3)
py
Runtime Error
17
3060
165
li=[13,1,2,3,4,5,6,7,8,9,10,11,12] A,B = [int(x) for x in input().split()] if(li[A]>li[B]): print('Alice') elif(li[A]==li[B]): print('Draw') else: print('Bob')
s812809406
p03803
u077019541
1553349934
Python
Python (3.4.3)
py
Runtime Error
17
3060
272
A,B = map(int,input().split()) if 1 in A or 1 in B: if A==1 and B==1: print("Draw") elif A==1: print("Alice") else: print("Bob") else: if A>B: print("Alice") elif B>A: print("Bob") else: print("Draw")
s111791944
p03803
u227082700
1553196805
Python
Python (3.4.3)
py
Runtime Error
17
2940
92
a,b=map(int,input().split());a,b=(a+11)%13,(b+11)%13 if a>b:print("Alice");else:print("Bob")
s609713307
p03803
u366959492
1552960897
Python
Python (3.4.3)
py
Runtime Error
18
2940
154
a,b = (int(x) for x in input.split()) if a==1: a=14 if b==1: b=14 if a>b: print("Alice") elif a<b: print("Bob") else: print("Draw")
s904569973
p03803
u366959492
1552960865
Python
Python (3.4.3)
py
Runtime Error
17
2940
151
a,b = (int(x) for in input.split()) if a==1: a=14 if b==1: b=14 if a>b: print("Alice") elif a<b: print("Bob") else: print("Draw")
s103102325
p03803
u118642796
1552507892
Python
PyPy3 (2.4.0)
py
Runtime Error
186
39792
144
A,B = map(int,input()) R = [0,13,1,2,3,4,5,6,7,8,9,10,11,12] if R[A]>R[B]: print("Alice") elif R[A]<R[B]: print("Bob") else: print("Draw")
s443208574
p03803
u664652300
1552251232
Python
Python (3.4.3)
py
Runtime Error
17
2940
147
a,b=map(int,input()) if a==b: print("Draw") elif a==1: print("Alice") elif b==1: print("Bob") elif a>b: print("Alice") else: print("Bob")
s336055513
p03803
u118211443
1551500982
Python
Python (3.4.3)
py
Runtime Error
17
3064
345
n,m=map(int,input().split()) a = [] for i in range(n): a.append(input()) b = [] for i in range(m): b.append(input()) ok=False cf=[] for i in range(n-m+1): for j in range(n-m+1): for l in range(m): cf.append(a[i+l][j:j+m]) #print(cf) if cf==b: ok=True cf=[] print("Yes"if ok else "No")
s850487617
p03803
u367130284
1551266142
Python
Python (3.4.3)
py
Runtime Error
21
3316
456
from collections import * n,m=map(int,input().split()) d=defaultdict(list) for s in m*[0]: a,b=map(int,input().split()) d[a].append(b) d[b].append(a) def DFS_dict(point,TFlist): if all(TFlist): return 1 ans=0 for i in d[point]: if TFlist[i-1]: continue TFlist[i-1]=True ans+=DFS_dict(i,TFlist) TFlist[i-1]=False return ans TFlist=[True]+[False]*(n-1) print(DFS_dict(1,TFlist))
s654183337
p03803
u449555432
1550939121
Python
Python (3.4.3)
py
Runtime Error
18
2940
111
a = (int(input())+13) % 15 b = (int(input())+13) % 15 print('Alice' if a > b else 'Bob' if a < b else 'Draw')
s541469714
p03803
u449555432
1550938955
Python
Python (3.4.3)
py
Runtime Error
18
2940
97
a=(int(input())+13)%15;b=(int(input())+13)%15;print('Alice' if a>b else 'Bob' if a<b else 'Draw')
s530549653
p03803
u449555432
1550938879
Python
Python (3.4.3)
py
Runtime Error
17
2940
88
a,b=(map(int,input().split())+13)%15;print('Alice' if a>b else 'Bob' if a<b else 'Draw')
s085539435
p03803
u449555432
1550938823
Python
Python (3.4.3)
py
Runtime Error
17
2940
87
a,b=(map(int,input().split())+13)%15;print('Alice' if a>b else 'Bob' if a<b else 'Draw)
s308344648
p03803
u887207211
1550919249
Python
Python (3.4.3)
py
Runtime Error
17
2940
151
A, B = map(int,input().split()) if((A == 1 and A < B) or A > B): print('Alice') elif((B == 1 and A > B) or A < B): print('Bob') else: print(Draw)
s158423757
p03803
u777028980
1550091139
Python
Python (3.4.3)
py
Runtime Error
17
2940
137
a,b=(int,input().split()) if(a==1): a=14 if(b==1): b=14 if(a>b): print("Alice") elif(a<b): print("Bob") else: print("Drow")
s015417633
p03803
u363407238
1549930300
Python
Python (3.4.3)
py
Runtime Error
17
3064
339
n, m = map(int, input().split()) a = [input() for i in range(n)] b = [input() for i in range(m)] ans = 'No' for i in range(n - m + 1): sel = [] for j in range(n): sel.append(a[j][i: i + m]) for k in range(n - m + 1): tar = sel[k:k + m] if b == tar: ans = 'Yes' break print(ans)
s797581519
p03803
u549497563
1549730365
Python
Python (3.4.3)
py
Runtime Error
18
3060
178
a,b = map(int,input().split()) x = [2,3,4,5,6,7,8,9,10,11,12,1] if x.index(a)>x.index(b): print("Alice") elif x.index(a)==x.index(b): print("Draw") else: print("Bob")
s211031058
p03803
u500297289
1549147837
Python
Python (3.4.3)
py
Runtime Error
18
2940
180
""" AtCoder """ A, B = map(int, input().split()) if A == 1: A = 14 if B == 1: B = 14: if A > B: print("Alice") elif A == B: print("Draw") else: print("Bob")
s376240123
p03803
u231647664
1548184903
Python
Python (3.4.3)
py
Runtime Error
18
2940
167
A, B = int(map, input().split()) if A <= B: if A == 1: print('Alice') else: print('Bob') else: if B == 1: print('Bob') else: print('Alice')
s532763482
p03803
u231647664
1548184854
Python
Python (3.4.3)
py
Runtime Error
18
2940
164
A, B = int(map, input().split()) if A <= B: if A = 1: print('Alice') else: print('Bob') else: if B = 1: print('Bob') else: print('Alice')
s697108561
p03803
u427344224
1547699713
Python
PyPy3 (2.4.0)
py
Runtime Error
178
38256
883
N, Ma, Mb = map(int, input().split()) items = [] for i in range(N): a, b, c = map(int, input().split()) items.append((a, b, c)) a_sum = sum([item[0] for item in items]) b_sum = sum([item[1] for item in items]) inf = float("inf") dp = [[[inf for _ in range(a_sum + 100)] for _ in range(b_sum + 100)] for i in range(N+1)] dp[0][0][0] = 0 for i in range(N): for a in range(a_sum + 1): for b in range(b_sum + 1): dp[i + 1][a][b] = min(dp[i + 1][a][b], dp[i][a][b]) dp[i + 1][a + items[i][0]][b + items[i][1]] = min(dp[i + 1][a + items[i][0]][b + items[i][1]], dp[i][a][b] + items[i][2]) ans = inf for a in range(1, a_sum + 1): for b in range(1, b_sum + 1): if a * Mb == b * Ma: ans = min(ans, dp[N][a][b]) if ans != inf: print(ans) else: print(-1)
s539877150
p03803
u239342230
1546381515
Python
Python (3.4.3)
py
Runtime Error
17
2940
94
a,b=map(int,input().split().replace(1,14) print('Draw' if a==b else 'Alice' if a>b else 'Bob')
s142752450
p03803
u020604402
1546297610
Python
Python (3.4.3)
py
Runtime Error
19
3064
609
N,M=map(int,input().split()) L=[] S=[] for i in range(N): x = input() l=[y for y in x] L.append(l) for i in range(M): x = input() s=[y for y in x] S.append(s) flag = 0 sum = 0 for i in range(N): for j in range(N): for k in range(M): for l in range(M): if i+k < N and j+l < N: if L[i+k][j+l] == S[k][l]: sum += 1 if sum == M * M: flag = 1 else: sum = 0 if flag == 0: print("No") else: print("Yes")
s442893581
p03803
u020604402
1546297553
Python
PyPy3 (2.4.0)
py
Runtime Error
184
38640
608
N,M=map(int,input().split()) L=[] S=[] for i in range(N): x = input() l=[y for y in x] L.append(l) for i in range(M): x = input() s=[y for y in x] S.append(s) flag = 0 sum = 0 for i in range(N): for j in range(N): for k in range(M): for l in range(M): if i+k < N and j+l < N: if L[i+k][j+l] == S[k][l]: sum += 1 if sum == M * M: flag = 1 else: sum = 0 if flag == 0: print("No") else: print("Yes")
s548058174
p03803
u020604402
1546297536
Python
PyPy3 (2.4.0)
py
Runtime Error
177
38384
628
N,M=map(int,input().split()) L=[] S=[] for i in range(N): x = input() l=[y for y in x] L.append(l) for i in range(M): x = input() s=[y for y in x] S.append(s) flag = 0 sum = 0 for i in range(N): for j in range(N): for k in range(M): for l in range(M): if i+k < N and j+l < N: if L[i+k][j+l] == S[k][l]: sum += 1 if sum == M * M: flag = 1 else: sum = 0 if flag == 0: print("No") else: print("Yes") remote@deb465:~/pyt
s012530633
p03803
u379089982
1546137379
Python
Python (3.4.3)
py
Runtime Error
17
2940
97
a,b=input().split() 1=14 if a>b: print('Alice') elif a==b: print('Draw') else: print('Bob')
s475727201
p03803
u379089982
1546137286
Python
Python (3.4.3)
py
Runtime Error
17
2940
96
a,b=input().split() 1=14 if a>b: print('Alice') elif a=b: print('Draw') else: print('Bob')
s456999433
p03803
u054106284
1543987897
Python
Python (3.4.3)
py
Runtime Error
18
3064
728
N, Ma, Mb= (int(i) for i in input().split()) L = [] for i in range(N): a, b, c = (int(i) for i in input().split()) L.append((a, b, c)) dp= [[[float("inf")] * (10 * N + 11) for a in range(10 * N + 11) ] for i in range(N + 1)] dp[0][0][0] = 0 for i in range(N): a, b, c = L[i] for ca in range(10 * N + 1): for cb in range(10 * N + 1): dp[i+1][ca][cb] = min(dp[i+1][ca][cb], dp[i][ca][cb]) dp[i+1][ca + a][cb + b] = min(dp[i+1][ca + a][cb + b], dp[i][ca][cb] + c) reslis = [] ra, rb = (Ma, Mb) while ra <= 10 * N and rb <= 10 * N: reslis.append(dp[N][ra][rb]) ra += Ma rb += Mb reslis.sort() res = reslis[0] if res == float("inf"): print(-1) else: print(res)
s494446258
p03803
u060936992
1543284360
Python
Python (3.4.3)
py
Runtime Error
17
2940
155
# a,b=gets.chomp.split(" ").map(&:to_i); if a<b a=!1? (w='Bob'):(w='Alice') elsif b<a b=!1? (w='Alice'):(w='Bob') else w='Draw' end puts(w)
s432893056
p03803
u111365959
1542981871
Python
Python (3.4.3)
py
Runtime Error
18
3060
189
a,b = [int(x) for x in input().split()] j = [2,3,4,5,6,7,8,9,10,11,12,13,1] if j.index(a) > j.rindex(b): print('Alice') elif j.index(a) < j.index(b): print('Bob') else: print('Draw')
s207442481
p03803
u111365959
1542981796
Python
Python (3.4.3)
py
Runtime Error
17
2940
189
j = [2,3,4,5,6,7,8,9,10,11,12,13,1] a,b = [int(x) for x in input().split()] if j.index(a) > j.rindex(b): print('Alice') elif j.index(a) < j.index(b): print('Bob') else: print('Draw')
s930176853
p03803
u111365959
1542981785
Python
Python (3.4.3)
py
Runtime Error
17
3060
191
j = [2,3,4,5,6,7,8,9,10,11,12,13,1] a,b = [int(x) for x in input().split()] if j.index(a) > j.rindex(b): print('Alice') elif j.rindex(a) < j.rindex(b): print('Bob') else: print('Draw')
s719751496
p03803
u111365959
1542981690
Python
Python (3.4.3)
py
Runtime Error
17
3060
191
j = [2,3,4,5,6,7,8,9,10,11,12,13,1] a,b = [int(x) for x in input().split()] if j.rindex(a) < j.rindex(b): print('Alice') elif j.rindex(a) > j.rindex(b): print('Bob') else: print('Draw')
s768099021
p03803
u658993896
1542245323
Python
Python (3.4.3)
py
Runtime Error
19
3188
342
N,Ma,Mb=list(map(int,input().split())) mix=set([(0,0,0)]) rate=Ma/Mb ans=10**9 for i in range(N): a,b,c=list(map(int,input().split())) tmp=mix.copy() for x in tmp: d=x[0]+a e=x[1]+b f=x[2]+c mix.add((d, e, f)) if d/e==Ma/Mb and f<ans: ans=f if ans==10**9: ans=-1 print(ans)
s549104336
p03803
u869728296
1541801494
Python
Python (3.4.3)
py
Runtime Error
21
3188
232
a=input().strip().split(" ") b=[int(i) for i in a] for i in range(2): if(b[i]==1): b[i]="13" else: b[i]=b[i]-1 if(b[0]>b[1]): print("Alice") elif(b[0]==b[1]): print("Draw") else: print("Bob")
s842905070
p03803
u897302879
1540863938
Python
Python (3.4.3)
py
Runtime Error
17
3060
177
power = [i for i in range(2, 12+1)] + [1] A, B = map(lambda x: power.index(int(x)), input().split()) if A < B: print('Bob') elif A == B: print('Draw') else: print('Alice')
s625223933
p03803
u897302879
1540863838
Python
Python (3.4.3)
py
Runtime Error
17
2940
177
power = [i for i in range(1, 12+1)] + [2] A, B = map(lambda x: power.index(int(x)), input().split()) if A < B: print('Bob') elif A == B: print('Draw') else: print('Alice')
s234808660
p03803
u848647227
1540590151
Python
Python (3.4.3)
py
Runtime Error
17
3064
258
a = list(map(int,input())) if a[0] == 1 and a[1] == 1: print("Draw") elif a[0] == 1: print("Alice") elif a[1] == 1: print("Bob") else: if a[0] > a[1]: print("Alice") elif a[0] == a[1]: print("Draw") else: print("Bob")
s867848331
p03803
u426108351
1540325429
Python
PyPy3 (2.4.0)
py
Runtime Error
169
38640
798
def lensetlist(A): B = [] for i in A: if i not in B: B.append(i) return len(B) N, M = map(int, input().split()) A = [] B = [] for i in range(M): a, b = map(int, input().split()) A.append(a) B.append(b) used = [0 for i in range(N)] result = [] stack = [] ans = 0 def path(start, visited): if len(visited) == N: result.append(visited[:]) exit stack.append(start) while len(stack) > 0: nextpoint = stack.pop() if nextpoint in visited: continue visited.append(nextpoint) for i in range(M): if A[i] == start: path(B[i], visited) if B[i] == start: path(A[i], visited) visited.pop() path(1, []) print(lensetlist(result))