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: Accepted

Solution code:
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("Bob")
else:
    print("Draw")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A, B = list(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: Accepted

Solution code:
data = raw_input()

q = data.split(" ")

x = int(q[0])
y = int(q[1])

if x == 1:
  x = 14
if y == 1:
  y = 14

if x == y:
  print "Draw"
  exit(0)

if x > y:
  print "Alice"
  exit(0)
print "Bob"

Submission status: Accepted

Solution code:
a = list(map(lambda x: int(x) if x!='1' else 14, input().split()))
if a[0]> a[1]:
    print('Alice')
elif a[0] == a[1]:
    print('Draw')
else:
    print('Bob')

Submission status: Accepted

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: Accepted

Solution code:
a,b = [int(i) for i in raw_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: Accepted

Solution code:
from sys import stdin

a, b = map(int, stdin.readline().split())

if a == 1:
    a = 100
if b == 1:
    b = 100

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

Submission status: Accepted

Solution code:
A, B = map(int, raw_input().split())

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

Submission status: Accepted

Solution code:
a,b = list(map(int,input().split()))
if a==1:a+=13
if b==1:b+=13

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

Submission status: Accepted

Solution code:
import sys

def debug(x, table):
    for name, val in table.items():
        if x is val:
            print('DEBUG:{} -> {}'.format(name, val), file=sys.stderr)
            return None

def solve():
    A, B = map(int, input().split())

    if A == B:
        ans = 'Draw'
    else:
        if A == 1:
            ans = 'Alice'
        elif B == 1:
            ans = 'Bob'
        elif A > B:
            ans = 'Alice'
        else:
            ans = 'Bob'

    print(ans)


if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
A,B = [(int(x)-2)%13 for x in raw_input().split()]
if A>B:
  print "Alice"
elif A<B:
  print "Bob"
else:
  print "Draw"

Submission status: Accepted

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

Submission status: Accepted

Solution code:
p = [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 1]

a, b = map(map(str, p).index, raw_input().split())
if a > b:
    print "Alice"
elif a < b:
    print "Bob"
else:
    print "Draw"

Submission status: Accepted

Solution code:
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("Bob")
else:
  print("Draw")

Submission status: Accepted

Solution code:
a,b = list(map(int, input().split(' ')))
if a == 1:
    a = 20
if b == 1:
    b = 20

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

Submission status: Accepted

Solution code:
from sys import stdin
def g(n):
 if n=='1':
  return 14
 return int(n)
a,b = stdin.readline().strip().split()
a = g(a)
b = g(b)
if a > b:
 print 'Alice'
elif a<b:
 print 'Bob'
else:
 print 'Draw'

Submission status: Accepted

Solution code:

A, B  = [int(_) for _ in 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')
else:
    print('asdf')

Submission status: Accepted

Solution code:
from collections import defaultdict


def main():
    A, B = map(int, input().split())

    if A == 1:
        A += 100
    if B == 1:
        B += 100

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = map(int ,raw_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: Accepted

Solution code:


a, b = list(map(int, input().split()))

if a == 1:
    a = 99

if b == 1:
    b = 99


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

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin
def na(): return map(int, stdin.readline().split())
def ns(): return stdin.readline().strip()

a,b = na()
if  a == 1: a += 13
if b == 1: b += 13
if a > b:
    print("Alice")
elif a < b:
    print("Bob")
else:
    print("Draw")

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

A = int(input('Alice'))
B = int(input('Bob'))

if A==1:
  A+=13
if B==1:
  B++13

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

Submission status: Runtime Error

Solution code:
A = input('A')
B = input('B')


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

Submission status: Runtime Error

Solution code:
A = input('A')
B = input('B')


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

Submission status: Runtime Error

Solution code:
A = input('A')
B = input('B')

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

Submission status: Runtime Error

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

if A==B
	print("Draw")
elif A>B
	if B==1
  		print("Bob")
    else print("Alice")
elif A<B
	if A==1
  		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())
if A == B:
  print("Draw")
elif A == 1 and :
  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 or a = 1:
  print("Alice")
elif b > a or b = 1:
  print("Bob")

Submission status: Runtime Error

Solution code:
a b = int(x) for x in input().split()
if a == b:
  print("Draw")
elif a > b and b != 1:
  print("Alice")
elif a < b and a != 1:
  print("Bob")
elif a==1:
  print("Alice")
else:
  print("Bob")

Submission status: Runtime Error

Solution code:
a b = int(x) for x in input().split()
if a == b:
  print("Draw")
elif a > b and b != 1:
  print("Alice")
elif a < b and a != 1:
  print("Bob")
elif a==1:
  print("Alice")
else
  print("Bob")

Submission status: Runtime Error

Solution code:
a b = int(x) for x in input().split()
if a == b:
  print("Draw")
elif a > b and b != 1:
  print("Alice")
elif a < b and a != 1:
  print("Bob")
elif a==1:
  print("Alice")
elif b==1:
  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:

Submission status: Runtime Error

Solution code:
a = list(int(input()))
if a[0] ==0 or a[1]==0:
  a.replace("0","14")
if a[0]>a[1]:print("Alice")
elif a[0]=a[1]:print("Draw")
elif a[0]<a[1]:print("Bob")

Submission status: Runtime Error

Solution code:
a = list(input())
if a[0] ==0 or a[1]==0:
  a.replace("0","14")
if a[0]>a[1]:print("Alice")
elif a[0]=a[1]:print("Draw")
elif a[0]<a[1]:print("Bob")

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())
if a != 1 and b!= 1:
  if a > b:
    print("Alice")
  elif a < b:
    print("Bob")
  else:
    print("Draw")
elif a!=1 and b == 1:
  print("Bob")
elif a == 1 and b != 1:
  print("Alice")
else:
  print("Draw")

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)]
for i in a:
  for j in b:
    if j not in i:
      print("No")
      exit()
print("Yes")

Submission status: Runtime Error

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

if a>b and b!=1 or a==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("Draw")
elif a == 1 or a > b >= 2:
    print("Alice")
elif b == 1 or b > a >= 2:
    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 >= 2):
    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 or a > b >= 2:
    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 or a > b:
    print("Alice")
else:
    print("Bob")

Submission status: Runtime Error

Solution code:
a, b = map(int, input())
if a > b or (a == 1 and b != 1):
  print("Alice")
elif a < b or (a !=1 and b == 1):
  print("Bob")
else:
  print("Draw")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N,M = map(int,input().split())
a = []
c = []
for i in range(N):
    b = list(input())
    a+=b
for i in range(M):
  b = list(input())
  c+=b
#print(c,a)
f = False
for i in range(N*N):
  if f == True:
    break
  if N*N-i<M*M:
    break
  count=0
  flag = True
  #print(i,c[0],a[i])
  if c[0] == a[i]:
    if N-(i%N)<M:
      continue
    num = i
    for j in range(M):
      for k in range(M):
        #print(c[count],a[num])
        if c[count] == a[num]:
          
          num+=1
          count+=1
        elif c[count]!=a[num]:
          flag =False
          break
      num+=N-M
      if flag == False:
        #print(i)
        break  
      if j == M-1:
        f = True
            
  else:
    continue
if f == False:
  print('No')
else:
  print('Yes')

Submission status: Runtime Error

Solution code:
a=(int(input())-2)%13
b=(int(input())-2)%13
print(["Draw","Bob","Alice"][((a==b)+1)*((a<b)-(b<a))])

Submission status: Runtime Error

Solution code:
a,b =map(int,input().split())
A,B,C ="Alice","Bob",Draw"
if max(a,b) =="13" and min(a,b) =="1":
  print(A) if a < b else print(B)
else:
  print(A) if a > b print(B) if a < b else print(C)

Submission status: Runtime Error

Solution code:

def main():
    a, b = map(int, input().split())
    if a-2 < 0:
        a = 14

    if b-2 < 0:
        b = 14i

    if a-2 > b-2:
        print('Alice')
    elif a-2 < b-2:
        print('Bob')
    else:
        print('Draw')


if __name__ == "__main__":
    main()

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())

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

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 = list(map(int, input().split()))
if a == 1:
  a = 14
else:
  break
if b == 1:
  b = 14
else:
  break
if a > b:
  print('Alice')
elif a == b:
  print('Draw')
else:
  print('Bob')

Submission status: Runtime Error

Solution code:
tmp = input().split(" ")
a = (int(tmp[0]) - 2) % 13
b = (int(tmp[1]) - 2) % 13
print("Alice") if a > b else print("Draw") if a = b else print("Bob")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

func=lambda x:(x,x+13)[x==1]

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

Submission status: Runtime Error

Solution code:
import itertools
N,M = map(int,input().split())
L=[]
for i in range(M):
    a,b=map(int,input().split())
    L.append([a,b])
 
number=[]
for i in range(1,N+1):
    number.append(i)
    
ans=0
 
for v in itertools.permutations(number,N):
    a=0
    v=list(v)
    for j in range(N-1):
        if ([v[j],v[j+1]] not in L ) and ([v[j+1],v[j]] not in L):
            a=1
    if a==0 and v[0]==1:
        ans+=1
 
print(ans)

Submission status: Runtime Error

Solution code:
li = [2,3,4,5,6,7,8,9,10,11,12,1]
a,b = map(int,input().split())
if li.index(a) == li.index(b):
    print("Draw")
elif li.index(a) > li.index(b):
    print("Alice")
else:
    print("Bob")

Submission status: Runtime Error

Solution code:
li = [2,3,4,5,6,7,8,9,10,11,12,1]
a,b = map(int,input().split())
if li.index(a) == li.index(b):
    print("Draw")
if li.index(a) > li.index(b):
    print("Alice")
else:
    print("Bob")

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

if lst[0] > lst[1]:
  print('Alice')
elif lst[0] < lst[1]:
  print('Bob')
else:
  print('Draw')

Submission status: Runtime Error

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

for _ in range(M):
    a, b = map(int,input().split())
    ab[a-1].append(b-1)
    ab[b-1].append(a-1)

count = 0

def dfs(i, now, done):
    global count
    if i == N-1:
        count += 1
        return

    for j in ab[now]:
        if j not in done:
            dfs(i+1, j, done + [j])
    return

dfs(0, 0, [0])
print(count)

Submission status: Runtime Error

Solution code:
import sys
A,B = map(int,input.split())
if A < 0 or A > 13 or B < 0 or B > 13:
    sys.exit()

if A == 1 or B == 1:
    if A == B:
        print("Draw")
    elif A == 1:
        print("Alice")
    elif B == 1:
        print("Bob")
    sys.exit()

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())

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

Submission status: Runtime Error

Solution code:
p=[2,3,4,5,6,7,8,9,10,11,12,13,1]
a,b=map(int,input().split())
print('ABloibc e'[p.index(a)<p.idex(b)::2] if a!=b else 'Draw')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
cards = input()
cards_s = cards.split()

porker_list = [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 1]

alice_str = cards_s[0]
alice_s = porker_list.index(alice_str)
alice = int(alice_s)

bob_str = cards_s[1]
bob_s = porker_list.index(bob_str)
bob = int(bob_s)

if alice > bob:
    print('Alice')
elif alice == bob:
    print('Draw')
else
    print('Bob')

Submission status: Runtime Error

Solution code:
cards = input()
cards_s = cards.split()

porker_list = [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 1]

alice_str = cards_s[0]
alice_int = int(alice_str)
alice = porker_list.index(alice_int)

bob_str = cards_s[1]
bob_int = int(bob_str)
bob = porker_list.index(bob_int)

if alice > bob:
    print('Alice')
elif alice == bob:
    print('Draw')
else
    print('Bob')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A, B = map(int, input().split()))
if A == B:
    print("Draw")
elif A == 1 and B != 1:
    print("Alice")
elif B == 1 and A != 1:
    print("Bod")
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:
  print('Alice')
elif b==1:
  print('Bob')
elif a>b:
  print('Alice')
else:
  print('Bob')

Submission status: Runtime Error

Solution code:
# ACB054C
n, m = map(int, input().split())
L = [[] for i in range(n)]

for i in range(m):
    a, b = map(int, input().split())
    L[a-1].append(b-1)
    L[b-1].append(a-1)

ans = 0
def f(t, history):
    history[t] += 1
    his = history[:]
    global ans
    if sum(his) == n:
        ans += 1
    else:
        
        for i in L[t]:
            if his[i] == 0:
                f(i, his)
            
f(0, [0]*n)
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a = list(map(int, input().split()))
a = [i for i in a if i != 1 else 14]
if a[0] > a[1]:
    print('Alice')
elif a[0] == a[1]:
    print('Draw')
else:
    print('Bob')

Submission status: Runtime Error

Solution code:
if a == 1: a += 13
if b == 1: b += 13

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

Submission status: Runtime Error

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


if __name__ == "__main__":
    main()

Submission status: Runtime Error

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

def judge(a,b):
  if a > b:
    return "Alice"
  elif a = b:
    return "Draw"
  else:
    return "Bob"
  
print(judge(A,B))

Submission status: Runtime Error

Solution code:
class Graph():
    def __init__(self):
        """ ノードのつながりを辞書型で表現する """
        self.adjacency_dict = {}
    
    def add_vertex(self, v):
        """ ノードを追加する """
        self.adjacency_dict[v] = []
    def add_edge(self, v1, v2):
        """ ノード同士をつなぐ。"""
        # 無向グラフの場合は双方向。もし有向グラフなら片側のみ。
        self.adjacency_dict[v1].append(v2)
        self.adjacency_dict[v2].append(v1)
    def remove_edge(self, v1, v2):
        """ ノード同士のつながりを削除する。"""
        self.adjacency_dict[v1].remove(v2)
        self.adjacency_dict[v2].remove(v1)
    def remove_vertex(self,v):
        """ ノードを削除する。"""
        while self.adjacency_dict[v] != []:
            adjacent_vertex = self.adjacency_dict[v][-1]
            self.remove_edge(v, adjacent_vertex)
        del self.adjacency_dict[v]
    
    def print_graph(self):
        print(self.adjacency_dict)

    def _init_internal_graph(self, graph_dict):
        self.adjacency_dict = graph_dict
    
    def get_edge(self, v):
        """ 指定されたノードに関するエッジを返す。"""
        return self.adjacency_dict[v]

def dprint(*args):
  if debug:
    if len(args)==1:
      print(args[0])
    else:
      print(args)

debug = False
if debug:
  g = Graph()
  # N,M = [7, 7]
  # g._init_internal_graph({0: [2], 1: [6], 2: [0, 3], 3: [2, 4, 5], 4: [3, 5], 5: [3, 4, 6], 6: [1, 5]})
  
  N,M = [3, 3]
  g._init_internal_graph({0: [1, 2], 1: [0, 2], 2: [0, 1]})
else:
  N, M = map(int, input().split())
  g = Graph()
  dprint(N,M)

  for n in range(N):
    g.add_vertex(n)

  # 0-origin    
  for m in range(M):
      v1,v2 = list(map(int, input().split()))
      g.add_edge(v1-1,v2-1)                     

# g.print_graph()

seen = [False] * N
count = 0

def dfs(node, depth):
    dprint(node,depth)        
    if seen[node]:
        return 0
    if depth == N - 1:
        dprint('count-up',seen)
        return 1

    seen[node] = True
    dprint(seen)
    
    total_paths = 0
    for next_node in g.get_edge(node):
      total_paths += dfs(next_node, depth + 1)

    # seenを未到達にして次へ
    seen[node] = False

    return total_paths

count = dfs(0, 0)
print(count)

Submission status: Runtime Error

Solution code:
Score_Alice, Score_Bob = map(int, input().split())

if Score_Alice == 1 and Score_Bob == 1:
  print('Draw')
elif Score_Alice == 1 and Score_Bob != 1:
  print('Alice')
elif Score_Alice != 1 and Score_Bob == 1:
  print('Bob')
else:
  if Score_Alice > Score_Bob:
    print('Alice')
  elif Score_Alice < Scoer_Bob:
    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:
	pirnt('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:
	pirnt('Alice')
elif B == 1:
	print('Bob')
elif A > B:
	print('Alice')
else:
	print('Bob')

Submission status: Runtime Error

Solution code:
from itertools import permutations
n,m = map(int,input().split())

rel_t = [[False for i in range(n)] for j in range(n)]

for i in range(m):
    a,b = map(int,input().split())
    rel_t[a-1][b-1]=True
    rel_t[b-1][a-1]=True

cnt=0
n_list = [i for i in range(n)]
for l in permutations(n_list,len(n_list)):
    if(l[0]!=1):
        continue
    judge=[rel_t[l[i]][l[i+1]] for i in range(n-1)]
    if all(judge):
        cnt+=1

print(cnt)

Submission status: Runtime Error

Solution code:
import re
n,m = map(int, input().split())
a = [input().strip() for i in range(n)]
b = [input().strip() for i in range(m)]

mc = n-m+1
tb = [[0]*mc]*mc
ans = False
for ai in range(0, mc):
  if(ans):
    break
  ind = [m.start() for m in re.finditer(b[0], a[ai])]
  for i in ind:
    if(ans):
      break
    for bi in range(1, mc):
      if(a[ai+bi][i:i+m] != b[bi]):
        break
      if(bi==mc-1):
        ans = True
if(ans):
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a,b=list(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())

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

Submission status: Runtime Error

Solution code:
a,b=[int(i) for i in input().split()]
list=["2","3","4","5","6","7","8","9","10","11","12","13","1"]
A=list.index(a)
B=list.index(b)
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())
    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:
import itertools

N, M_a, M_b = map(int, input().split())

a_l = [None] * N
b_l = [None] * N
c_l = [None] * N

result = -1

for i in range(N):
    a_l[i], b_l[i], c_l[i] = map(int, input().split())
    # print(a_l[i], b_l[i], c_l[i])

for i in range(N+1):
    for V in itertools.combinations_with_replacement([n for n in range(N)], i):
        if len(V) == 0:
            continue
        # print(V)
        # continue
        a_total = sum(a_l[v] for v in V)
        b_total = sum(b_l[v] for v in V)
        c_total = sum(c_l[v] for v in V)
        if result < c_total and result != -1:
            continue
        # print('a_total:', a_total)
        # print('b_total:', b_total)
        if a_total / b_total == M_a / M_b:
            # print(f'調合可能 {c_total}')
            result = c_total
print(result)

Submission status: Runtime Error

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

if A==1 & B==!:
    print("Draw")
elif A==1 :
    print("Alice")
elif B==1 :
    print("Bob")
elif A > B:
    print("Alice")
elif B>A:
    print("Bob")
else :
    print("Draw")

Submission status: Runtime Error

Solution code:
n,ma,mb = map(int,input().split())
L = []
for i in range(n):
    a,b,c = map(int,input().split())
    L.append([a,b,c])
dp = [[10**5]*401 for i in range(401)]
make = [[0,0],[L[0][0],L[0][1]]]
dp[L[0][0]][L[0][1]] = L[0][2]
dp[0][0] = 0
for i in range(1,n):
    a = L[i][0]
    b = L[i][1]
    c = L[i][2]
    for j in range(len(make)):
        t = make[j][0]
        u = make[j][1]
        dp[t+a][u+b] = min(dp[t][u]+c,dp[t+a][u+b])
        make.append([t+a, u+b])
    make = list(set(make))
if ma <= mb:
    cnt = 1
    ans = 10**5
    while mb*cnt <= 400:
        ans = min(ans, dp[ma*cnt][mb*cnt])
        cnt += 1
    if ans == 10**5:
        print(-1)
    else:
        print(ans)
else:
    cnt = 1
    ans = 10**5
    while ma*cnt <= 400:
        ans = min(ans, dp[ma*cnt][mb*cnt])
        cnt += 1
    if ans == 10**5:
        print(-1)
    else:
        print(ans)

Submission status: Runtime Error

Solution code:
A, B = map(int, input().split())
print('Alice' if A>B or A==1 and B==2 else 'Draw' if A==B 'Bob')

Submission status: Runtime Error

Solution code:
A, B = map(int, input().split())
print('Alice' if A>B or A==1 and B==2 'Draw' if A==B 'Bob')

Submission status: Runtime Error

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

Submission status: Runtime Error

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

if a == b:
    print("Draw")
elif a == 1 B != 1:
            print("Alice")
elif a != 1 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 B != 1:
            print("Alice")
elif a != 1 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')
else b>a:
  print('Bob')

Submission status: Runtime Error

Solution code:
N,Ma,Mb= (int(x) for x in input().split())
a = [0]*N
b = [0]*N
c = [0]*N
# use = [0]*N
ans = 40*100+1
for i in range (N):
    a[i],b[i],c[i] = (int(x) for x in input().split())
# 0ならつかわない1なら使う
A = 0
B = 0
C = 0
def search(N,Ma,Mb,a,b,c,A,B,C):
    if (B!= 0 and A/B == Ma/Mb):
            return C
    if(N==1):
#         use[N-1] = 0
#         if (B!= 0 and A/B == Ma/Mb):
#             return C
        use[N-1] = 1
        A += a[N-1]
        B += b[N-1]
        C += c[N-1]
        if (B!= 0 and A/B == Ma/Mb):
             return C
        else: C = ans
        return C
    else:
#         use[N-1] = 0
        c0 = search(N-1,Ma,Mb,a,b,c,A,B,C)
#         use[N-1] = 1
        A += a[N-1]
        B += b[N-1]
        C += c[N-1]
        c1 = search(N-1,Ma,Mb,a,b,c,A,B,C)
    return min(c0,c1)

Ans = search(N,Ma,Mb,a,b,c,use,A,B,C)
if(Ans == ans):
    print("-1")
else: print(Ans)

Submission status: Runtime Error

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

if A > B and B != 1:
	print("Alice")
elif A == B:
	print("Draw")
elif B > A and A != 1:
	print("Bob")

Submission status: Runtime Error

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

if b == 1: b += 13
if a == 1: a += 13

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