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

A = []
for _ in range(N):
  a = input()
  A.append(a)

B = []
for _ in range(M):
  b = input()
  B.append(b)

existed = False
for i in range(N - M + 1):
  for j in range(N - M + 1):
    match = True
    for mi in range(M):
      for mj in range(M):
        x = i + mi
        y = j + mj

        if (A[y][x] != B[mj][mi]):
          match = False
          break
      
      if (match == False):
        break

    if (match):
      existed = True
      break
  
  if (existed):
    break

result = 'Yes' if (existed) else 'No'
print(result)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A,B=map(int,input().split())
if A=1:
    A=14
if B=1:
    B=14
print(['ABloibc e'[A<B::2],'Draw'][A==B])

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()))
s=[2,3,4,5,6,7,8,9,10,11,12,13,1]
if s.index(a)==s.index(b):
    print('Draw')
elif s.index(a)>s.index(b):
    print('Alice')
else:
    print('Bob')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math

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:
    if b=='H':
        print('Bob')
    else:
        print('Draw')

Submission status: Runtime Error

Solution code:
if a > b :
    if b == 1:
        print("Bob")
    else:
        print("Alice")
    print("Alice")
elif a <b :
    if a==1:
        print("Alice")
    else:
        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 or a>b
  print("Alice")
elif b=1:
  print("Bob")
else:
  print("Bob")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math

N, Ma, Mb = map(int,input().split())
rate = Ma / Mb
a = [0] * N
b = [0] * N
c = [0] * N
MA = 0
MB = 0
for i in range(N):
    a[i], b[i], c[i] = map(int, input().split())
    MA += a[i]
    MB += b[i]

dp = [[[math.inf for i in range(MB+1)] for j in range(MA+1)] for k in range(N+1)]
dp[0][0][0] = 0

for it_N in range(N):
    for it_MA in range(MA+1):
        for it_MB in range(MB+1):
            if it_MA >= a[it_N] and it_MB >= b[it_N]:
                if dp[it_N][it_MA-a[it_N]][it_MB-b[it_N]] != math.inf:
                    dp[it_N+1][it_MA][it_MB] = min(dp[it_N][it_MA-a[it_N]][it_MB-b[it_N]] + c[it_N], dp[it_N][it_MA][it_MB])
            else:
                dp[it_N+1][it_MA][it_MB]=dp[it_N][it_MA][it_MB]

#    for it_MA in range(MA+1):
#        for it_MB in range(MB+1):
#print(it_N+1,it_MA,it_MB,dp[it_N+1][it_MA][it_MB])

#中身確認
ans = -1
for a in range(1, MA+1):
    for b in range(1, MB+1):
        print(a,b,dp[N][a][b])
        if a/b == rate and dp[N][a][b] != math.inf:
            if ans == -1:
                ans = dp[N][a][b]
            else:
                ans = min([dp[N][a][b], ans])
print(ans)

Submission status: Runtime Error

Solution code:
import math

N, Ma, Mb = map(int,input().split())
rate = Ma / Mb
a = [0] * N
b = [0] * N
c = [0] * N
MA = 0
MB = 0
for i in range(N):
    a[i], b[i], c[i] = map(int, input().split())
    MA += a[i]
    MB += b[i]

dp = [[[math.inf for i in range(MB+1)] for j in range(MA+1)] for k in range(N+1)]
dp[0][0][0] = 0

for it_N in range(N):
    for it_MA in range(MA+1):
        for it_MB in range(MB+1):
            if it_MA >= a[it_N] and it_MB >= b[it_N]:
                if dp[it_N][it_MA-a[it_N]][it_MB-b[it_N]] != math.inf:
                    dp[it_N+1][it_MA][it_MB] = min(dp[it_N][it_MA-a[it_N]][it_MB-b[it_N]] + c[it_N], dp[it_N][it_MA][it_MB])
            else:
                dp[it_N+1][it_MA][it_MB]=dp[it_N][it_MA][it_MB]

    for it_MA in range(MA+1):
        for it_MB in range(MB+1):
#            print(it_N+1,it_MA,it_MB,dp[it_N+1][it_MA][it_MB])

#中身確認
ans = -1
for a in range(1, MA+1):
    for b in range(1, MB+1):
        print(a,b,dp[N][a][b])
        if a/b == rate and dp[N][a][b] != math.inf:
            if ans == -1:
                ans = dp[N][a][b]
            else:
                ans = min([dp[N][a][b], ans])
print(ans)

Submission status: Runtime Error

Solution code:
import numpy as np
    
strong_order = np.array([14,2,3,4,5,6,7,8,9,10.11,12,13])

A,B = [int(i)-1 for i in input().split()]

if strong_order[A] > strong_order[B]:
    print("Alice")
elif strong_order[A] < strong_order[B]:
    print("Bob")
else:
    print("Draw")

Submission status: Runtime Error

Solution code:
import itertools
n, m = map(int, input().split())
l = [list(map(int, input().split())) for i in range(m)]
r = [[] for i in range(n + 1)]
ans = 0
for i in range(m):
    r[l[i][0]].append(l[i][1])
    r[l[i][1]].append(l[i][0])
p = []
for i in range(n):
    p.append(i + 1)
p = list(itertools.permutations(p))
for i in range(len(p)):
    check = True
    t = list(p[i])
    if t[0] != 1:
        check = False
    for j in range(len(t)-1):
        if not t[j + 1] in r[t[j]]:
            check = False
    if check:
        ans += 1
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
line = input().split(' ')
N,M = int(line[0]),int(line[1])
A = []
B = []
exe = 0
for i in range(N):
  A.append(input())
for i in range(M):
  B.append(input())
for i in range(N-M+1):
  f = 0
  for j in range(N-M+1):
    if A[i][j:j+M] == B[0]:
      f = 1
      for k in range(M):
        if not A[i+k][j:j+M] == B[k]:
          f = 0
          break
    if f == 1:
      exe = 1
if exe == 0:
  print("No")
else:
  print("Yes")

Submission status: Runtime Error

Solution code:
from itertools import permutations
n, m = map(int, input().split())
ab = [[] for i in range(n)]
for i in range(m):
    a, b = map(lambda x: int(x) - 1, input().split())
    ab[a].append(b)
    ab[b].append(a)
cnt = 0
if n == 2:
    if 1 in ab[0]:
        print(1)
    else:
        print(0)
    exit()
for p in permutations(range(1, n)):
    if p[0] in ab[0]:
        flag = True
        for i in range(n - 2):
            if p[i + 1] not in ab[p[i]]:
                flag = False
                break
        if flag:
            cnt += 1
print(cnt)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

card_alice = cards.index(int(input()))
card_bob = cards.index(int(input()))

if card_alice > card_bob:
    print("Alice")
elif card_alice == card_bob:
    print("Draw")
else:
    print("Bob")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A, B = map(int, input().split())
if A == B:
  print('Draw')
else:
  print( 'Alice' if A if A != 1 else A+13 > B if B != 1 else B+ 13 else 'Bob')

Submission status: Runtime Error

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

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




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

Submission status: Runtime Error

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

if (A=1 and B!=1):
    print("Alice")
    
   




if (A>B):
    print("Alice")
elif(A<B):
    print("Bob")
elif(A==B):
    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:
data = [int(idx) for idx in input().split()]

if data[0] == data[1]:
  print("Draw")
else:
  if data[0] > data[1] or data[0] == 1:
  	print("Alice")
  else data[0] < data[1] or data[1] == 1:
  	print("Bob")

Submission status: Runtime Error

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

if cardArray[0]== carArray[1]:
  print("Draw")
elif cardArray[0] < cardArray[1]:
  if cardArray[0] == 1:
    print("Alice")
  else:
    print("Bob")
else:
  if cardArray[1] == 1:
    print("Bob")
  else:
    print("Alice")

Submission status: Runtime Error

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

if cardArray[0]== carArray[1]:
  print("Draw")
elif cardArray[0] < cardArray[1]:
  if cardArray[0] == 1:
    print("Alice")
  else:
    print("Bob")
else:
  if cardArray[1] == 1:
    print("Bob")
  print("Alice")

Submission status: Runtime Error

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

if cardArray[0]== carArray[1]:
  print("Draw")
elif cardArray[0] < cardArray[1]:
  if cardArray[0] == 1:
    print("Alice")
  else:
    print("Bob")
else:
  print("Bob")

Submission status: Runtime Error

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

if cardArray[0]= carArray[1]:
  print("Draw")
elif cardArray[0] < cardArray[1]:
  if cardArray[0] == 1:
    print("Alice")
  else:
    print("Bob")
else:
  print("Bob")

Submission status: Runtime Error

Solution code:
n,ma,mb=map(int,input().split())
dp=[[0]*401 for _ in range(401)]
for _ in range(n):
  a,b,c=map(int,input().split())
  for i in range(400,-1,-1):
    for j in range(400,-1,-1):
      if i-a<0 or j-b<0:
        continue
      else:
        if dp[i-a][j-b]==0:
          continue
        else:
          if dp[i][j]==0:
            dp[i][j]=dp[i-a][j-b]+c
          else:
            dp[i][j]=min(dp[i][j],dp[i-a][j-b]+c)
  if dp[a][b]==0:
    dp[a][b]=c
  else:
    dp[a][b]=min(dp[a][b],c)
ans=10**10
for i in range(401):
  if i*ma>400 or i*mb>400:
    break
  if dp[i*ma][i*mb]==0:
    continue
  else:
    ans=min(ans,dp[i*ma][i*mb])
if ans==10**10:
  print(-1)
else:
  print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
fn main() {
    let a: i32 = read();
    let b: i32 = read();
    if a == 1 {
        println!("Alice");
    } else if b == 1 {
        println!("Bob");
    } else if a > b {
        println!("Alice");
    } else if a < b {
        println!("Bob");
    } else {
        println!("Draw");
    }
}

// 以下関数

use std::io::*;
use std::str::FromStr;
pub fn read<T: FromStr>() -> T {
    let stdin = stdin();
    let stdin = stdin.lock();
    let token: String = stdin
        .bytes()
        .map(|c| c.expect("failed to read char") as char)
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect();
    token.parse().ok().expect("failed to parse token")
}

pub const MOD: u64 = 10e9 as u64 + 7;

pub fn is_prime(n: i32) -> bool {
    if n < 2 {
        return false;
    } else if n == 2 {
        return true;
    }
    let mut i = 2;
    while i * i < n {
        if n % i == 0 {
            return false;
        } else {
            i += 1;
            continue;
        }
    }
    true
}

pub fn lcm(mut n: i32, mut m: i32) -> i32 {
    n = if n > m { m } else { n };
    m = if n > m { n } else { m };
    let mut i = n;
    while i % m != 0 {
        i += n;
    }
    i
}

pub fn abs(n: i32) -> i32 {
    if n >= 0 {
        n
    } else {
        -n
    }
}

pub fn max(n: i32, m: i32) -> i32 {
    if n >= m {
        n
    } else {
        m
    }
}

pub fn min(n: i32, m: i32) -> i32 {
    if n <= m {
        n
    } else {
        m
    }
}

Submission status: Runtime Error

Solution code:
A, B = map(int, input().split())
if A == 1:
    A += 13
if B == 1:
    B += 13
win_Alice = A - B
if win_Alice = 0:
    print('Draw')
else:
    print('Alice' if win_Alice > 0 else 'Bob')

Submission status: Runtime Error

Solution code:
# https://atcoder.jp/contests/abc054/tasks/abc054_c

import copy
import sys
input = sys.stdin.readline

# 頂点, 辺の数
N, M = map(int, input().split())

# グラフのリスト
# 各頂点からどこの頂点に向かう辺があるかどうかという情報
Graph_list = [[] for i in range(N)]

# 入力
for i in range(M):
    a, b = map(int, input().split())
    a += -1
    b += -1

    # 無向グラフなのでa, b両方
    Graph_list[a].append(b)
    Graph_list[b].append(a)

ans_count = 0
throwgh_point_list = [-1 for i in range(N)]

def dfs(i, current, throwgh_point_list, ans_point_list):   
    # 頂点をN個通ったら終了処理
    if i >= N:
        # すでにカウント済の経路である場合
        if throwgh_point_list in ans_point_list:
            return

        # すでにカウント済ではないかつ全ての点に到達している場合
        # 順不同で比較
        if set(throwgh_point_list) == set(list(range(N))):
            global ans_count
            ans_count += 1
            ans_point_list.append(copy.copy(throwgh_point_list))
        return

    for j in range(len(Graph_list[current])):
        # 現在地を書き込む
        throwgh_point_list[i] = current

        # 次の点に移動する        
        dfs(i + 1, Graph_list[current][j], throwgh_point_list, ans_point_list)

dfs(0, 0, throwgh_point_list, [])
print(ans_count)

Submission status: Runtime Error

Solution code:
a,b = int(input())
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 == 1:
  if b == 1:
    print("Draw")
    exit()
  else:
  	print("Alice")
    exit()
else:
  if a == b:
    print("Draw")
    exit()
  elif a > b:
    print("Alice")
    exit()
  else:
    print("Bob")
    exit()

Submission status: Runtime Error

Solution code:
import java.util.Scanner;

public class A{
    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);
        String j = scanner.nextLine();
        String[] tmpcards = j.split(" ");
        int[] cards = new int[3];
        for (int i = 0; i < 2; i++){
            cards[i] = Integer.parseInt(tmpcards[i]);
            if (cards[i] == 1)
                cards[i] += 13;
        }
        if (cards[0] == cards[1]){
            System.out.println("Draw");
        } else {
            System.out.println(cards[0] > cards[1]?"Alice":"Bob");
        }
    }
}

Submission status: Runtime Error

Solution code:
import java.util.Scanner;

public class A{
    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);
        String j = scanner.nextLine();
        String[] tmpcards = j.split(" ");
        int[] cards = new int[3];
        for (int i = 0; i < 2; i++){
            cards[i] = Integer.parseInt(tmpcards[i]);
            if (cards[i] == 1)
                cards[i] += 13;
        }
        if (cards[0] == cards[1]){
            System.out.println("Draw");
            scanner.close();
            return;
        }
        System.out.println(cards[0] > cards[1]?"Alice":"Bob");
        scanner.close();
    }
}

Submission status: Runtime Error

Solution code:
import sys

a,b = map(int, sys.stdin.readline().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 = map( int, input().split() )
if A > B :
   print( "Alice" )
elseif A < B :
   print( "Bob" )
else : 
   print( "Draw" )

Submission status: Runtime Error

Solution code:
:cross:

Submission status: Runtime Error

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

A = [input() for n in range(N)]
B = [input() for m in range(M)]

ans = "Yes"
for a in A:
    for b in B:
        print(a, b)
        if b not in a:
            ans = "No"
print(ans)

Submission status: Runtime Error

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

A = [input() for n in range(N)]
B = [input() for m in range(M)]
for a in A:
    cnt = 0
    for b in B:
        if b in a:
            cnt += 1
        else:
            cnt = 0
        if cnt == M:
            print("Yes")
            exit()

print("No")

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("Bob")
else:
    print("Alice")

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())
if (A+11)%13 > (B+11)%13:
  print("Alice")
elif (A+11)%13 < (B+11)%13:
  print("Bob")
else:
  print("Draw")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;
using ll = long long;

string solve() {
    ll A, B;
    cin >> A >> B;
    if ( A == 1 ) A = 14;
    if ( B == 1 ) B = 14;
    if ( A > B ) return "Alice";
    else if ( A< B ) return "Bob";
    else return "Draw";
}

int main() {
    auto ans = solve();
    cout << ans << "\n";
    return 0;
}

Submission status: Runtime Error

Solution code:
n , m = map(int, input().split())
a = [input() for _ in range(n)]
b = [input() for _ in range(m)]
#i, j はBの左端
for i in range(n-m+1):
    ans = True
    for j in range(n-m+1):
        for k in range(m):
            if a[i + k][j:j+m] != b[k]:
                ans = False
        if ans == True:
            break
    else:
        continue
    break

if ans == True:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A,B = map(int,input().split())
tmp = list(A,B)
ans = ["Alice","Bob"]
if tmp[0] == tmp[1]:
    print("Draw")
elif tmp[0] == 1:
    print(ans[0])
elif tmp[1] == 1:
    print(ans[1])
elif tmp[0] > tmp[1]:
    print(ans[0])
else:
    print(ans[1])

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('Alice')
elif b>a:
  print('Bob')
else:
  print('Draw')

Submission status: Runtime Error

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

if a == 1:
  print("Alice")
elif b == 1:
  print("Bob")
elif a < b:
  print("Bob")
else:
  print("Alice")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

n_list = [input() for _ in range(n)]
m_list = [input() for _ in range(m)]

for i in n_list:
    for j in m_list:
        if j not in i:
            print("No")
            quit()
print("Yes")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;

int main() {
    //input
    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;
    }

    return 0;
}

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

ans = True
for k in range(len(B)):
    if B[k] not in A[k]:
        ans = False
        break
print("Yes" if ans == True else "No")

Submission status: Runtime Error

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

cards = {"2": 1, "3": 2, "4": 3, "5": 4, "6": 5, "7": 6, "8": 7, "9 ": 8, "10": 9, "11": 10, "12": 11, "13": 12, "1": 13 }

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

Submission status: Runtime Error

Solution code:
Bob, Alice = list(map(int,input().split()))
ans = ["Bob", "Alice", "Draw"]

if Bob == Alice:
  print(ans[2])
elif Bob = 1 or Bob > Alice:
  print(ans[0])
else:
  print(ans[1])

Submission status: Runtime Error

Solution code:
a,b = map(int,input().split())
if a == 1:
  if b == 1:
    print(Draw)
  else:
    print(Alice)
elif b == 1:
  print(Bob)
else:
  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())
def one_14(num):
  if num==1:
    return 14
a=one_14(a)
b=one_14(b)
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 == b:
    print("Draw")
elif a > b:
    if b == 1:
        print("Bob")
        break
    print("Alice")
else:
    print("Bob")

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 B < A:
  print("Alice")
elif B == A:
  pritn("Draw")

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
bonus = N // 15 * 200
print(N * 800 - bonus)

Submission status: Runtime Error

Solution code:
n,m = map(int,input().split())
path = list([False] * n for _ in range(n))
for i in range(m):
  a,b = map(int,input().split())
  a -= 1
  b -= 1
  path[a][b] = True
  path[b][a] = True
ans = 0
import itertools
for i in itertools.permutations(range(n),n):
  if i[0] == 0:
    for j in range(n):
      if j == n-1:
        ans += 1
        break
      if not path[i[j]][i[j+1]]:
        break
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:

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

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

Submission status: Runtime Error

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

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 = '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)