Problem:


Score : 100 points

Problem Statement

Alice and Bob are playing One Card Poker.

One Card Poker is a two-player game using playing cards.  

Each card in this game shows an integer between 1 and 13, inclusive.

The strength of a card is determined by the number written on it, as follows:  

Weak 2 < 3 < 4 < 5 < 6 < 7 < 8 < 9 < 10 < 11 < 12 < 13 < 1 Strong  

One Card Poker is played as follows:  

Each player picks one card from the deck. The chosen card becomes the player's hand.

The players reveal their hands to each other. The player with the stronger card wins the game.

If their cards are equally strong, the game is drawn.  

You are watching Alice and Bob playing the game, and can see their hands.

The number written on Alice's card is A, and the number written on Bob's card is B.

Write a program to determine the outcome of the game.  

Constraints

1≦A≦13 

1≦B≦13 

A and B are integers.

Input

The input is given from Standard Input in the following format:

A B

Output

Print Alice if Alice will win. Print Bob if Bob will win. Print Draw if the game will be drawn.

Sample Input 1

8 6

Sample Output 1

Alice

8 is written on Alice's card, and 6 is written on Bob's card.
Alice has the stronger card, and thus the output should be Alice.

Sample Input 2

1 1

Sample Output 2

Draw

Since their cards have the same number, the game will be drawn.

Sample Input 3

13 1

Sample Output 3

Bob



Sample input:
8 6


Sample output:
Alice

Submission status: Runtime Error

Solution code:
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)

Submission status: Runtime Error

Solution code:
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')

Submission status: Runtime Error

Solution code:
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')

Submission status: Runtime Error

Solution code:
a, b = map(int, input().split())
if a < b:
    print("Bob")
if a > b:
    print("Alice")
if a = b:
    print("Draw")

Submission status: Runtime Error

Solution code:
a,b=map(int, input().split())

if a>b:
    print(Alice)
elif a<b:
    print(Bob)
else:
    print(Drow)

Submission status: Runtime Error

Solution code:
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")

Submission status: Runtime Error

Solution code:
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")

Submission status: Runtime Error

Solution code:
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')

Submission status: Runtime Error

Solution code:
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')

Submission status: Runtime Error

Solution code:
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')

Submission status: Runtime Error

Solution code:
A, B = map(int, input())

if A < B:
    print('Alice')
if A > B:
    print('Bob')
else:
    print('Draw')

Submission status: Runtime Error

Solution code:
a,b = int(input().split)

if a ==b :
    print("Draw")
elif a == 1 or a>b:
    print("Alice")
else:
    print("Bob")

Submission status: Runtime Error

Solution code:
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)

Submission status: Runtime Error

Solution code:
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")

Submission status: Runtime Error

Solution code:
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")

Submission status: Runtime Error

Solution code:
a,b = map(list(map,input().split(" ")))
if a>b:
    print("Alice")
elif a<b :
    print("Bob")
else:
    print("Draw")

Submission status: Runtime Error

Solution code:
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")

Submission status: Runtime Error

Solution code:
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")

Submission status: Runtime Error

Solution code:
A,B=map(int,input().split())
if A>B:
  print("Alice")
elif A==B:
  print(Draw)
else:
  print("Bob")

Submission status: Runtime Error

Solution code:
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

Submission status: Runtime Error

Solution code:
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)

Submission status: Runtime Error

Solution code:
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')

Submission status: Runtime Error

Solution code:
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')

Submission status: Runtime Error

Solution code:
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")

Submission status: Runtime Error

Solution code:
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")

Submission status: Runtime Error

Solution code:
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")

Submission status: Runtime Error

Solution code:
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")

Submission status: Runtime Error

Solution code:
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")

Submission status: Runtime Error

Solution code:
a = list(map(int,input().split()))
if a > b:
  print("Bob")
elif a == b:
  print("Draw")
else:
  print("Alice")

Submission status: Runtime Error

Solution code:
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')

Submission status: Runtime Error

Solution code:
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')

Submission status: Runtime Error

Solution code:
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")

Submission status: Runtime Error

Solution code:
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")

Submission status: Runtime Error

Solution code:
a, b = [int(item) for item in input().split()]
if a > b:
  print("Alice")
eiif a == b:
  print("Draw")
else:
  print("Bob")

Submission status: Runtime Error

Solution code:
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')

Submission status: Runtime Error

Solution code:
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')

Submission status: Runtime Error

Solution code:
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')

Submission status: Runtime Error

Solution code:
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')

Submission status: Runtime Error

Solution code:
a,b=map(int,input().split())
if a>b:
  print('Alice')
if a=b:
  print('Draw')
else:
  print('Bob')

Submission status: Runtime Error

Solution code:
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")

Submission status: Runtime Error

Solution code:
A,B = int(input().split())
if A == B:
  print('Draw')
elif A > B:
  print('Alice')
else:
  print('Bob')

Submission status: Runtime Error

Solution code:
a, b = ((int(x) - 2) % 100 for x in input().split())
print('Draw' if a == b else 'Alice' a > b else 'Bob')

Submission status: Runtime Error

Solution code:
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())

Submission status: Runtime Error

Solution code:
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')

Submission status: Runtime Error

Solution code:
A, B = int(input())

if A==B:
	print('Draw')
elif A>B or A==1:
	print('Alice')
else:
	print('Bob')

Submission status: Runtime Error

Solution code:
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')

Submission status: Runtime Error

Solution code:
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")

Submission status: Runtime Error

Solution code:
a,b=map(int,input().split());a,b=(a+11)%13,(b+11)%13
if a>b:print("Alice");else:print("Bob")

Submission status: Runtime Error

Solution code:
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")

Submission status: Runtime Error

Solution code:
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")

Submission status: Runtime Error

Solution code:
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")

Submission status: Runtime Error

Solution code:
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")

Submission status: Runtime Error

Solution code:
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")

Submission status: Runtime Error

Solution code:
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))

Submission status: Runtime Error

Solution code:
a = (int(input())+13) % 15
b = (int(input())+13) % 15

print('Alice' if a > b else 'Bob' if a < b else 'Draw')

Submission status: Runtime Error

Solution code:
a=(int(input())+13)%15;b=(int(input())+13)%15;print('Alice' if a>b else 'Bob' if a<b else 'Draw')

Submission status: Runtime Error

Solution code:
a,b=(map(int,input().split())+13)%15;print('Alice' if a>b else 'Bob' if a<b else 'Draw')

Submission status: Runtime Error

Solution code:
a,b=(map(int,input().split())+13)%15;print('Alice' if a>b else 'Bob' if a<b else 'Draw)

Submission status: Runtime Error

Solution code:
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)

Submission status: Runtime Error

Solution code:
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")

Submission status: Runtime Error

Solution code:
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)

Submission status: Runtime Error

Solution code:
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")

Submission status: Runtime Error

Solution code:
""" 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")

Submission status: Runtime Error

Solution code:
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')

Submission status: Runtime Error

Solution code:
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')

Submission status: Runtime Error

Solution code:
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)

Submission status: Runtime Error

Solution code:
a,b=map(int,input().split().replace(1,14)
print('Draw' if a==b else 'Alice' if a>b else 'Bob')

Submission status: Runtime Error

Solution code:
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")

Submission status: Runtime Error

Solution code:
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")

Submission status: Runtime Error

Solution code:
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

Submission status: Runtime Error

Solution code:
a,b=input().split()
1=14
if a>b:
  print('Alice')
elif a==b:
  print('Draw')
else:
  print('Bob')

Submission status: Runtime Error

Solution code:
a,b=input().split()
1=14
if a>b:
  print('Alice')
elif a=b:
  print('Draw')
else:
  print('Bob')

Submission status: Runtime Error

Solution code:
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)

Submission status: Runtime Error

Solution code:
# 
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)

Submission status: Runtime Error

Solution code:
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')

Submission status: Runtime Error

Solution code:
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')

Submission status: Runtime Error

Solution code:
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')

Submission status: Runtime Error

Solution code:
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')

Submission status: Runtime Error

Solution code:
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)

Submission status: Runtime Error

Solution code:
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")

Submission status: Runtime Error

Solution code:
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')

Submission status: Runtime Error

Solution code:
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')

Submission status: Runtime Error

Solution code:
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")

Submission status: Runtime Error

Solution code:
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))

Submission status: Runtime Error

Solution code:
a.b=map(int,input().split())
if a==1:
    if b==1:
        print('Draw')
    else:
        print('Alice')
else:
    if b==1:
        print('Bob')
    else:
        if a>b:
            print('Alice')
        elif a==b:
            print('Draw')
        else:
            print('Bob')

Submission status: Runtime Error

Solution code:
A. B = list(map(int, input().split()))
if A == B:
    ans = 'Draw'
elif A == 1:
    ans = 'Alice'
elif B == 1:
    ans = 'Bob'
else:
    ans = 'Alice' if A > B else 'Bob'

print(ans)

Submission status: Runtime Error

Solution code:
A, B = map(int, input(),split())
if A == 1:
    A = 14
elif B == 1:
    B = 14
if A > B:
    print("Alice")
elif A < B:
    print("Bob")
else:
    print("Draw")

Submission status: Runtime Error

Solution code:
A,B = map(int, input().split())
print('Alice' if cards.index(A) > cards.index(B) else 'Bob' if cards.index(A) < cards.index(B) else 'Draw' )

Submission status: Runtime Error

Solution code:
N,M=map(int,input().split())
A=[ list(input()) for i in range(N)]
B=[ list(input()) for i in range(M)]
ans='Yes'
for i in range(N-M+1):
    for j in range(N-M+1):
        
        for k in range(i,i+M):
            for l in range(j,j+M):
                if A[k][l]!=B[k-i][l-j]:
                    ans='No'
print(ans)

Submission status: Runtime Error

Solution code:
a, b = input().split()
a, b = int(a), int(b)
print("Draw" if a == b elif a < b "Bob" else "Alice")

Submission status: Runtime Error

Solution code:
a,b = int(input())
if a == 1:
  a += 13
if b == 1:
  b += 13
if a > b:
  print("Alice")
if a < b:
  print("Bob")
if a == b:
  print("Drow")

Submission status: Runtime Error

Solution code:
A, B = map(int, input())
if A == B:
  print("Draw")
elif A == 1:
  print("Alice")
elif B == 1:
  print("Bob")
else:
  if A < B:
    print("Bob")
  else:
    print("Alice")

Submission status: Runtime Error

Solution code:
N,M=map(int, input().split())
A=[input() for _ in range(N)]
B=[input() for _ in range(M)]

for i in range(N-M+1):
    for j in range(N-M+1):
        t=[k[j:j*m] for k in a[i:i+m]]
        if t==B:
            print('Yes')
            exit()
print('No')

Submission status: Runtime Error

Solution code:
A,B=input().split()
poker=['2','3','4','5','6','7','8','9','10','11','12','1']
if poker.index(A)<poker.index(B):
    print('Bob')
elif  poker.index(A)>poker.index(B):
    print('Alice')
else:
    print('Draw')

Submission status: Runtime Error

Solution code:
N,Ma,Mb=map(int,input().split())
a=[0 for i in range(N)]
b=[0 for i in range(N)]
c=[0 for i in range(N)]
M=401
dp=[[[10**4 for cb in range(M)]for ca in range(M)]for i in range(N+1)]
for i in range(N):
    a[i],b[i],c[i]=map(int,input().split())
dp[0][0][0]=0
for i in range(N):
    for ca in range(M):
        for cb in range(M):
            if dp[i][ca][cb]==10**4:
                continue
            dp[i+1][ca][cb]=min([dp[i+1][ca][cb],dp[i][ca][cb]])
            dp[i+1][ca+a[i]][cb+b[i]]=min([dp[i+1][ca+a[i]][cb+b[i]],dp[i][ca][cb]+c[i]])
ans=10**4
for i in range(1,M):
    for j in range(1,M):
        if i*Mb==j*Ma:
            if dp[N][i][j]<ans:
                ans=dp[N][i][j]
if ans!=10**4:
    print(ans)
else:
    print(-1)

Submission status: Runtime Error

Solution code:
#54b
n,m =map(int,input().split())
a=[input() for _ in range(n)]
b=[input() for _ in range(m)]

for i in range(n-m+1):
    for j in range(n-m+1):
        t = [k[j:j+m] for k in a[i:i+m]]
        if t==b:
            print('Yes')
            exit()
print('No')

Submission status: Runtime Error

Solution code:
n, m = [int(i) for i in input().split()]
A = [[] for i in range(n+1)]

for i in range(m):
    a, b = [int(i) for i in input().split()]
    A[a].append(b)
    A[b].append(a)

flag = [False] * (n+1)
flag[0] = True
cnt = 0

def dfs(i, flag):
    flag[i] = True
    for b in A[i]:
        if not flag[b]:
            dfs(b, flag[:])
    if all(flag) == True:
        global cnt
        cnt += 1

dfs(1, flag[:])
print(cnt)

Submission status: Runtime Error

Solution code:

def one(x):
    if x == 1:
        ret = 14
        return ret
    else:
        ret = x
        return ret

a, b = map(int, int(input())
if one(a) > one(b):
    print("Alice")
elif one(a) < one(b):
    print("Bob")
else:
    print("Draw")

Submission status: Runtime Error

Solution code:
a, b = map(input().split())
if a > b:
    print("Alice")
elif a < b:
    print("Bob")
else:
    print("Draw")

Submission status: Runtime Error

Solution code:
from itertools import combinations
N, Ma, Mb = list(map(int, input().split()))
abc = [list(map(int, input().split())) for _ in range(N)]
min_cost = -1
for _i in range(1, N+1):
    all_pattern = list(combinations(range(N), _i))
    for _j in all_pattern:
        _a = sum([abc[_k][0] for _k in _j])
        _b = sum([abc[_k][1] for _k in _j])
        _c = sum([abc[_k][2] for _k in _j])
        if _b * Ma == _a * Mb:
            if min_cost == -1 or min_cost > _c:
                min_cost = _c
print(min_cost)

Submission status: Runtime Error

Solution code:
a, b = [int('14' if x == '1' else x) for x in input().split()
print('Alice' if a > b else 'Bob' if b > a else 'Draw')

Submission status: Runtime Error

Solution code:
a,b=(int(i)+11)%13 for i in input().split()
print("Bob" if a<b else "Alice" if a>b else "Draw")

Submission status: Runtime Error

Solution code:
a = [int(i) for i in input().split()] 
if a[0] == 1:
  a[0] = a[0] +13
if a[1] ==1:
  a[1] = a[1] + 13
if a[0] > a[1]:
  print("Alice")
elif a[0] < a[1]:
  print("Bob")
else
  print("Draw")

Submission status: Runtime Error

Solution code:
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')

Submission status: Runtime Error

Solution code:
while 1<=A<=13 and 1<=B<=13
  if A=B:
       print("Draw")
  elif A=1 and B=13:
       print("Alice")
  elif A=13 and B=1:
       print("Bob")
  elif A>B:
       print("Alice")
  else A<B:
       print("Bob")

Submission status: Runtime Error

Solution code:
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")

Submission status: Runtime Error

Solution code:
A, B = map(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')

Submission status: Runtime Error

Solution code:
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')

Submission status: Runtime Error

Solution code:
A,B=map(int,input().split())
elif A==B==1 :
    print("Draw")
if A==1:
    print("Alice")
elif B==1 :
    print("Bob")
elif A<B:
    print("Bob")
elif A>B:
    print("Alice")
elif A==B:
    print("Draw")

Submission status: Runtime Error

Solution code:
A,B=map(int,input().split())
if A==1:
    print(Alice)
elif B==1 :
    print(Bob)
elif A==B==1 :
    print(Draw)
elif A<B:
    print(Bob)
elif A>B:
    print(Alice)
elif A==B:
    print(Draw)

Submission status: Runtime Error

Solution code:
A,B=map(int,input().split())
if A==1:
  A+=13
if B==1:
  B+=13:

if A==B:
  print("Draw")
elif A<B:
  print("Bob")
else:
  print("Alice")

Submission status: Runtime Error

Solution code:
a, b = map(int input().split())

def convert_num(a):
    if a == 1:
        a = 14
    return a

a = convert_num(a)
b = convert_num(b)
if a > b:
    print('Alice')
elif a == b:
    print('Draw')
else:
    print('Bob')