Problem:


Score : 500 points

Problem Statement

Alice and Brown loves games. Today, they will play the following game.

In this game, there are two piles initially consisting of X and Y stones, respectively.
Alice and Bob alternately perform the following operation, starting from Alice:

Take 2i stones from one of the piles. Then, throw away i of them, and put the remaining i in the other pile. Here, the integer i (1≤i) can be freely chosen as long as there is a sufficient number of stones in the pile.

The player who becomes unable to perform the operation, loses the game.

Given X and Y, determine the winner of the game, assuming that both players play optimally.

Constraints

0 ≤ X, Y ≤ 10^{18}

Input

Input is given from Standard Input in the following format:

X Y

Output

Print the winner: either Alice or Brown.

Sample Input 1

2 1

Sample Output 1

Brown

Alice can do nothing but taking two stones from the pile containing two stones. As a result, the piles consist of zero and two stones, respectively. Then, Brown will take the two stones, and the piles will consist of one and zero stones, respectively. Alice will be unable to perform the operation anymore, which means Brown's victory.

Sample Input 2

5 0

Sample Output 2

Alice

Sample Input 3

0 0

Sample Output 3

Brown

Sample Input 4

4 8

Sample Output 4

Alice



Sample input:
2 1


Sample output:
Brown

Submission status: Accepted

Solution code:
x, y = map(int, input().split())
if abs(x-y) <= 1:
  print('Brown')
else:
  print('Alice')

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
print("ABlriocwen"[abs(a-b)<=1::2])

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
print("ABlriocwen"[not abs(a-b)>1 :: 2])

Submission status: Accepted

Solution code:

def main():
    x, y = map(int, input().split())

    if abs(x - y) <= 1:
        print('Brown')
    else:
        print('Alice')


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
X, Y = list(map(int, input().split()))
print("Brown") if abs(X - Y) <= 1 else print("Alice")

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())
print('Brown' if abs(X - Y) < 2 else 'Alice')

Submission status: Accepted

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

if abs(x-y)<=1:
    print("Brown")
else:
    print("Alice")

Submission status: Accepted

Solution code:
def main():
    X, Y = map(int, input().split())
    if max(X, Y) <= 1:
        print("Brown")
    elif abs(X - Y) <= 1:
        print("Brown")
    else:
        print("Alice")


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(300000)


def solve(X: int, Y: int):
    if abs(X - Y) <= 1:
        ret = "Brown"
    else:
        ret = "Alice"
    print(ret)
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    X = int(next(tokens))  # type: int
    Y = int(next(tokens))  # type: int
    solve(X, Y)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
x, y = map(int, input().split())
if x == y or abs(x-y) == 1:
    print("Brown")
else:
    print("Alice")

Submission status: Accepted

Solution code:
print('ABlriocwen'[-2<eval(input().replace(' ','-'))<2::2])

Submission status: Accepted

Solution code:
print'ABlriocwen'[eval(raw_input().replace(' ','-'))**2<2::2]

Submission status: Accepted

Solution code:
import os
import sys
from functools import lru_cache

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(2147483647)
INF = float("inf")

X, Y = list(map(int, sys.stdin.readline().split()))


# @debug
@lru_cache(maxsize=None)
def grundy(x, y):
    if (x, y) in [(0, 1), (1, 0), (1, 1)]:
        return 0

    gs = set()
    for i in range(2, x + 1, 2):
        gs.add(grundy(x - i, y + i // 2))
    for i in range(2, y + 1, 2):
        gs.add(grundy(x + i // 2, y - i))
    ret = 0
    while ret in gs:
        ret += 1
    return ret


# for i in range(100):
#     for j in range(100):
#         print(i, j, grundy(i, j))

# if grundy(X, Y):
#     print('Alice')
# else:
#     print('Brown')

if abs(X - Y) <= 1:
    print('Brown')
else:
    print('Alice')

Submission status: Accepted

Solution code:
X,Y=map(int,input().split())
if abs(X-Y)<=1:
  print("Brown")
else:
  print("Alice")

Submission status: Accepted

Solution code:
x,y=map(int,input().split())
count=0
if abs(x-y)>1:
    print("Alice")
else:
    print("Brown")

Submission status: Accepted

Solution code:
x, y = map(int, input().split())
if abs(x-y) > 1:
    print("Alice")
else:
    print("Brown")

Submission status: Accepted

Solution code:
#
# 　　  ⋀_⋀　 
#　　  (･ω･)  
# .／ Ｕ ∽ Ｕ＼
#  │＊　合　＊│
#  │＊　格　＊│ 
#  │＊　祈　＊│ 
#  │＊　願　＊│ 
#  │＊　　　＊│ 
#      ￣
#
import sys
input=sys.stdin.readline
from math import floor,ceil,sqrt,factorial
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
inf=float('inf')
mod = 10**9+7
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    X, Y = MI()
    if abs(X - Y) <= 1:
        print("Brown")
    else:
        print("Alice")

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#import numpy as np
#from numpy import*
#from scipy.sparse.csgraph import shortest_path #shortest_path(csgraph=graph) # dijkstra# floyd_warshall
#from scipy.sparse import csr_matrix

from collections import* #defaultdict Counter deque appendleft
from fractions import gcd
from functools import* #reduce
from itertools import* #permutations("AB",repeat=2) combinations("AB",2) product("AB",2) groupby accumulate
from operator import mul,itemgetter
from bisect import* #bisect_left bisect_right
from heapq import* #heapify heappop heappushpop
from math import factorial,pi
from copy import deepcopy
import sys
sys.setrecursionlimit(10**8)
#input=sys.stdin.readline  #危険！基本オフにしろ！

def main():
    a,b=map(int,input().split())
    if abs(a-b)>=2:
        print("Alice")
    else:
        print("Brown")
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
x,y=map(int,input().split())
if abs(x-y)<=1:print('Brown')
else:print('Alice')

Submission status: Accepted

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

answer = 'Brown' if abs(x - y) <= 1 else 'Alice'
print(answer)

Submission status: Accepted

Solution code:
X,Y = [ int(it) for it in input().split() ]
if ( abs(X-Y)//2 == 0 ):
  print ("Brown")
else:
  print ("Alice")

Submission status: Accepted

Solution code:
# encoding:utf-8
import copy
import random
import bisect #bisect_left　これで二部探索の大小検索が行える
import fractions #最小公倍数などはこっち
import math

mod = 10**9+7

X,Y = map(int,input().split())

if abs(X-Y) > 1:
    print("Alice")
else:
    print("Brown")

Submission status: Accepted

Solution code:
X,Y=map(int,input().split())
if abs(X-Y)<=1:
    print("Brown")
else:
    print("Alice")

Submission status: Accepted

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

if abs(x-y) <= 1:
    print("Brown")
else:
    print("Alice")

Submission status: Accepted

Solution code:
x, y = [int(item) for item in input().split()]
if abs(x-y) > 1:
    print("Alice")
else:
    print("Brown")

Submission status: Accepted

Solution code:
x,y = map(int,input().split())
if abs(x-y) <= 1:
    print('Brown')
else:
    print('Alice')

Submission status: Accepted

Solution code:
import sys

def main():
    input = sys.stdin.readline
    X, Y = map(int, input().split())

    if abs(X - Y) <= 1:
        return 'Brown'
    else:
        return 'Alice'


if __name__ == '__main__':
    print(main())

Submission status: Accepted

Solution code:
def alice_and_brown(X: int, Y: int)->str:
    return 'Alice' if abs(X-Y) > 1 else 'Brown'


if __name__ == "__main__":
    X, Y = map(int, input().split())
    ans = alice_and_brown(X, Y)
    print(ans)

Submission status: Accepted

Solution code:
x,y=map(int,input().split());print("Brown" if abs(x-y)<=1 else "Alice")

Submission status: Accepted

Solution code:
import itertools
import math

x,y = map(int,input().split())

if abs(x-y) >= 2:
    print("Alice")
else:
    print("Brown")

Submission status: Accepted

Solution code:
N,M=map(int,input().split())
if N + M <= 1:print("Brown")
elif abs(N-M)<= 1:print("Brown")
else:print("Alice")

Submission status: Accepted

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

if abs(X-Y) >= 2: print( 'Alice' )
else: print( 'Brown' )

Submission status: Accepted

Solution code:
print('Brown' if abs(eval(input().replace(' ','-')))<=1 else 'Alice')

Submission status: Accepted

Solution code:
x,y=map(int,input().split())
if abs(x-y)<=1:
  print('Brown')
else:
  print ('Alice')

Submission status: Accepted

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

import sys  # {{{
import os
import time
import re
from pydoc import help
import string
import math
from operator import itemgetter
from collections import Counter
from collections import deque
from collections import defaultdict as dd
import fractions
from heapq import heappop, heappush, heapify
import array
from bisect import bisect_left, bisect_right, insort_left, insort_right
from copy import deepcopy as dcopy
import itertools
# }}}

# pre-defined{{{
sys.setrecursionlimit(10**7)
INF = 10**20
GOSA = 1.0 / 10**10
MOD = 10**9+7
ALPHABETS = [chr(i) for i in range(ord('a'), ord('z')+1)]  # can also use string module
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 I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def DP(N, M, first): return [[first] * M for n in range(N)]
def DP3(N, M, L, first): return [[[first] * L for n in range(M)] for _ in range(N)]
from inspect import currentframe
def dump(*args):
    names = {id(v):k for k,v in currentframe().f_back.f_locals.items()}
    print(', '.join(names.get(id(arg),'???')+' => '+repr(arg) for arg in args), file=sys.stderr)
# }}}

def local_input():# {{{
    from pcm.utils import set_stdin
    import sys
    from pathlib import Path
    parentdir = Path(os.path.dirname(__file__)).parent
    inputfile = parentdir.joinpath('test/sample-1.in')
    if len(sys.argv) == 1:
        set_stdin(inputfile)
# }}}

def solve():
    x, y = map(int, input().split())
    if abs(x-y) <= 1:
        print("Brown")
    else:
        print("Alice")
    return 0

if __name__ == "__main__":# {{{
    try:
        local_input()
    except:
        pass
    solve()
# vim: set foldmethod=marker:}}}

Submission status: Accepted

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

if abs(x - y) <= 1:
    print('Brown')
else:
    print('Alice')

Submission status: Accepted

Solution code:
#!usr/bin/env python3
from collections import defaultdict
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS():return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = I()
    return l
def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LI()
    return l
def SR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = S()
    return l
def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = SR()
    return l
mod = 1000000007

#A

#B

#C
"""
n = I()
a = LI()
ans = 0
k = a[0]
for i in range(1,n):
    if k*(k+a[i]) >= 0:
        if k < 0:
            ans += abs(1-k-a[i])
            a[i] = 1-k
            k = 1
        else:
            ans += abs(-1-k-a[i])
            a[i] = -1-k
            k = -1
    else:
        k += a[i]
print(ans)
"""

#D
x,y = LI()
if abs(x-y) <= 1:
    print("Brown")
else:
    print("Alice")
#E

#F

#G

#H

#I

#J

#K

#L

#M

#N

#O

#P

#Q

#R

#S

#T

Submission status: Accepted

Solution code:
x, y = map(int, input().split())
print("Alice" if abs(x-y)>1 else "Brown")

Submission status: Accepted

Solution code:
x,y =map(int,input().split())
print("Brown" if abs(x-y)<=1 else "Alice")

Submission status: Accepted

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

ans = 'Brown' if abs(x - y) <= 1 else 'Alice'

print(ans)

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())
print('Alice' if abs(X-Y) > 1 else 'Brown')

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

X, Y = map(int, input().split())

if abs(X - Y) <= 1:
    print('Brown')
else:
    print('Alice')

Submission status: Accepted

Solution code:
X,Y = map(int,input().split())
print("Brown" if abs(X-Y)<2 else "Alice")

Submission status: Accepted

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

if abs(X-Y) <= 1:
    print("Brown")
else:
    print("Alice")

Submission status: Accepted

Solution code:
X,Y=map(int,input().split())
g=abs(X-Y)
if g<=1:
  print("Brown")
else:
  print("Alice")

Submission status: Accepted

Solution code:
X, Y = map( int, input().split())
if abs( X-Y) <= 1:
    print("Brown")
else:
    print("Alice")

Submission status: Accepted

Solution code:
x, y = map(int, input().split())
if abs(x - y) == 0 or abs(x - y) == 1:
    print("Brown")
else:
    print("Alice")

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())
if abs(X - Y) <= 1:
    print('Brown')
else:
    print('Alice')

Submission status: Accepted

Solution code:
x,y=map(int,input().split());print('BArloiwcne'[abs(x-y)>1::2])

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())
print('Brown' if abs(X - Y) <= 1 else 'Alice')

Submission status: Accepted

Solution code:
X,Y = map(int,input().split())
ans = abs(X-Y)
if ans <= 1:
    print('Brown')
else:
    print('Alice')

Submission status: Accepted

Solution code:
(x, y) = map(int, raw_input().split())
ans = "Brown" if abs(x - y) <= 1 else "Alice"
print ans

Submission status: Accepted

Solution code:
#(X,Y)について実験をすると、

##X012345
#Y0BBAAAA...
##1BBBAAA...
##2ABBBAA...
##3AABBBA...
##4AAABBBA...
##5AAAABBBA...

#となるので、 Y-1 <= X <= Y+1 の時のみBが勝つ
X, Y = map(int, input().split())
if Y-1 <= X <= Y+1:
  print('Brown')
else:
  print('Alice')

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())
print("Alice" if abs(X- Y) > 1 else "Brown")

Submission status: Accepted

Solution code:
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


def main():
    X, Y = map(int, input().split())

    if abs(X - Y) <= 1:
        print("Brown")
    else:
        print("Alice")


if __name__ == '__main__':
    main()

Submission status: Accepted

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

if abs(x - y) <= 1:
    print("Brown")
else:
    print("Alice")

Submission status: Accepted

Solution code:
import sys
stdin = sys.stdin

def li(): return [int(x) for x in stdin.readline().split()]
def li_(): return [int(x)-1 for x in stdin.readline().split()]
def lf(): return [float(x) for x in stdin.readline().split()]
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(ns())
def nf(): return float(ns())

x,y = li()

if abs(x-y)<=1:
    print("Brown")
else:
    print("Alice")

Submission status: Accepted

Solution code:
X,Y = map(int,input().split())
if X > Y:
    X,Y = Y,X
if Y-X >= 2:
    print('Alice')
else:
    print('Brown')

Submission status: Accepted

Solution code:
print('ABlriocwen'[abs(eval(input().replace(' ','-')))<2::2])

Submission status: Accepted

Solution code:
print('ABlriocwen'[eval(input().replace(' ','-'))**2<2::2])

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
print(['Alice','Brown'][-1<=a-b<=1])

Submission status: Accepted

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

if X+Y <= 1 or (X == 1 and Y == 1):
  #cant move
  print("Brown")
elif abs(X-Y) <=1:
  print("Brown")
else:
  print("Alice")

Submission status: Accepted

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

if abs(x-y)>1:
    print('Alice')

if abs(x-y)<=1:
    print('Brown')

Submission status: Accepted

Solution code:
x,y = map(int,input().split())
if abs(x-y) <= 1:
  print("Brown")
else:
  print("Alice")

Submission status: Accepted

Solution code:
X,Y=map(int,input().split());print("Brown" if abs(X-Y)<=1 else "Alice")

Submission status: Accepted

Solution code:
x,y=map(int,input().split());print(['Alice','Brown'][abs(x-y)<2])

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub

sys.setrecursionlimit(10000)


def read_int():
    return int(input())


def read_int_n():
    return list(map(int, input().split()))


def read_float():
    return float(input())


def read_float_n():
    return list(map(float, input().split()))


def read_str():
    return input().strip()


def read_str_n():
    return list(map(str, input().split()))


def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(X, Y):
    if abs(X-Y) > 1:
        return 'Alice'
    return 'Brown'


def main():
    X, Y = read_int_n()
    print(slv(X, Y))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

if abs(x-y) > 1:
    print('Alice')
else:
    print('Brown')

Submission status: Accepted

Solution code:
#(1,0)と(1,1)が敗戦の最終状態。そこから遷移する状態を考える。
#(2,0),(3,0)は勝利状態。
#(2,1),(2,2)はどう遷移しても上記勝利状態に遷移してしまうので、敗北状態。
#(3,1),(4,0),(4,1),(5,0)...などが上記敗北状態に遷移できる状態なので勝利状態。
#実験を重ねると|X-Y|<=1が敗戦状態ではないか、という仮説が立つ。
#少し考えると、|X-Y|<=1からの遷移は必ず|X'-Y'|>1にならざるを得なくて
#|X-Y|>1からは必ず|X'-Y'|<=1となる遷移が存在することが分かる。
#最終的には|X-Y|<=1の状態は2N手後に(1,0)と(1,1)へと収斂するので、勝利条件が確定する。

X,Y=map(int,input().split())
if abs(X-Y)<=1:
  print("Brown")
else:
  print("Alice")

Submission status: Accepted

Solution code:
#!/usr/bin/env python

X,Y = map(int, input().split())

if X+Y <= 1:
  print('Brown')
  exit(0)

if abs(X-Y) <= 1:
  print('Brown')
else:
  print('Alice')

Submission status: Accepted

Solution code:
X, Y = map(int,input().split())
winner = "Brown" if abs(X-Y) <= 1 else "Alice"
print(winner)

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())
if abs(X-Y) < 2:
    print("Brown")
else:
    print("Alice")

Submission status: Accepted

Solution code:
X,Y = map(int,input().split())
if abs(X-Y)<=1:
        print("Brown")
else:
        print("Alice")

Submission status: Accepted

Solution code:
x, y = map(int, input().split())
print(["Brown","Alice"][abs(x-y)>1])

Submission status: Accepted

Solution code:
X,Y=map(int,input().split())
if max(X,Y)-min(X,Y) > 1:
  print("Alice")
else:
  print("Brown")

Submission status: Accepted

Solution code:
x,y = (int(i) for i in input().split())
if abs(x-y)<=1: print("Brown")
else: print("Alice")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x,y= map(int,input().split())
if abs(x-y) > 1:
  print("Alice")
else:
  print("Brown")

Submission status: Accepted

Solution code:
X,Y = map(int,input().split(" "))

if abs(X-Y) <= 1:
	print("Brown")
else:
	print("Alice")

Submission status: Accepted

Solution code:
def d_AliceBrown(X, Y):
    if abs(X - Y) <= 1:
        return 'Brown'
    else:
        return 'Alice'
    return None

X,Y = [int(i) for i in input().split()]
print(d_AliceBrown(X, Y))

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())
if abs(X-Y) <= 1:
    print('Brown')
else:
    print('Alice')

Submission status: Accepted

Solution code:
x, y = list(map(int, input().split()))
if x==y or x+1 ==y or x == y+1:
    print("Brown")
else:
    print("Alice")

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())
if abs(X-Y) > 1:
    print('Alice')
else:
    print('Brown')

Submission status: Accepted

Solution code:
X,Y=map(int,raw_input().split())
print "Brown" if abs(X-Y)<=1 else "Alice"

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())
print('Brown' if abs(X-Y) <= 1 else 'Alice')

Submission status: Accepted

Solution code:
X,Y=map(int, input().split())
if (abs(X-Y)<=1):
 print('Brown')
else:
 print('Alice')

Submission status: Accepted

Solution code:
X,Y = map(int,input().split())
print('Brown' if abs(X-Y) <= 1 else 'Alice')

Submission status: Accepted

Solution code:
from collections import defaultdict


def main():
    X, Y = map(int, input().split())
    print("Alice" if abs(X - Y) > 1 else "Brown")


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys


# sys.stdin = open('d1.in')


def read_int_list():
    return list(map(int, input().split()))


def read_str_list():
    return input().split()


def read_int():
    return int(input())


def read_str():
    return input()


solution = {}
choice = {}


def solve(x, y):
    if (x, y) in solution:
        return solution[(x, y)]
    for j in range(2, x + 1, 2):
        i = j // 2
        if not solve(x - 2 * i, y + i):
            res = True
            solution[(x, y)] = res
            choice[x, y] = x - 2 * i, y + i
            return res
    for j in range(2, y + 1, 2):
        i = j // 2
        if not solve(x + i, y - 2 * i):
            res = True
            solution[(x, y)] = res
            choice[x, y] = x + i, y - 2 * i
            return res
    res = False
    solution[(x, y)] = res
    return res


def solve2(x, y):
    return abs(x - y) >= 2


def test(N):
    for x in range(N):
        for y in range(N):
            if solve(x, y):
                print(x, y, '     ', choice[x, y])


def main():
    x, y = read_int_list()
    res = solve2(x, y)
    if res:
        print('Alice')
    else:
        print('Brown')


# test(10)
main()

Submission status: Accepted

Solution code:
a, b = map(int, raw_input().split())
if abs(a-b) <2:
    print "Brown"
else:
    print "Alice"

Submission status: Accepted

Solution code:
x, y = map(int, raw_input().split())
if abs(x-y) < 2:
    print "Brown"
else:
    print "Alice"

Submission status: Accepted

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

A, B  = map(int, raw_input().split())

if abs(A - B) < 2:
	print("Brown")
else:
	print("Alice")

Submission status: Accepted

Solution code:
a,b=map(int,input().split());print(abs(a-b)<2and'Brown'or'Alice')

Submission status: Accepted

Solution code:
a,b=map(int,raw_input().split());print abs(a-b)<2and'Brown'or'Alice'

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# 整数の入力
X,Y=map(int, input().split())
#出力
if abs(X-Y)<=1:
  print("Brown")
else:
  print("Alice")

Submission status: Accepted

Solution code:
a = list(map(int,input().split(" ")))
if abs(a[0] - a[1]) < 2:
    print("Brown")
else:
    print("Alice")

Submission status: Accepted

Solution code:
import sys
from functools import lru_cache

def solve():
    x, y = map(int, input().split())

    ans = 'Alice' if abs(x - y) >= 2 else 'Brown'

    print(ans)

if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
 
if abs(a-b)<2:
    print("Brown")
else:
    print("Alice")

Submission status: Accepted

Solution code:
kr=list(map(int,input().split()))
x,y=kr[0],kr[1]
if abs(x-y)==1 or abs(x-y)==0:
    print("Brown")
else:
    print("Alice")

Submission status: Accepted

Solution code:
import numpy as np

X,Y = list(map(int,input().split()))
'''
print(X)
print(Y)
Z = np.sort(Z)[::-1]
#print(Z)
count = 0
if Z[0]==1 or Z[0]==0:
    print ('Brown')
else:
    while Z[0] != 1:
        Z[1] += int(Z[0]/2)
        Z[0] -= int(Z[0]/2)*2
        Z = np.sort(Z)[::-1]
        count += 1
        print (Z)
    if (count%2) == 1:
        print ('Alice')
    else: print ('Brown')
'''

if np.abs(X-Y)<=1:
    print('Brown')
else:
    print('Alice')

Submission status: Accepted

Solution code:
x, y = map(int, input().split())
print('Brown' if abs(x-y) <= 1 else 'Alice')

Submission status: Accepted

Solution code:
#coding:utf-8

if __name__ == "__main__":
    X, Y = map(int, raw_input().split(" "))

    if X + Y <= 1:
        print "Brown"
    elif abs(X - Y) > 1:
        print "Alice"
    else:
        print "Brown"

Submission status: Accepted

Solution code:
xy = list(map(int , input().split()))
x = xy[0]
y = xy[1]
if abs(x - y) <= 1:
    print("Brown")
else:
    print("Alice")

Submission status: Accepted

Solution code:
x, y = map(int, input().split())
if abs(x-y)<=1:
    print("Brown")
else:
    print("Alice")

Submission status: Accepted

Solution code:
a,b=map(int,raw_input().split())
if(abs(a-b)<=1):
      print 'Brown'
else:
      print 'Alice'

Submission status: Accepted

Solution code:
X,Y = input().split()
X =int(X)
Y = int(Y)

if (X-Y)**2 > 1:
    print("Alice")
else:
    print("Brown")

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())
print('Brown' if Y - 1 <= X <= Y + 1 else 'Alice')

Submission status: Accepted

Solution code:

memo = {(0,1):False, (1, 1): False}
def solve(p):
    x,y = p
    if x > y:
        x,y = y,x
    if (x, y) in memo:
        return memo[(x,y)]
    if x < 2 and y < 2:
        return False
    hand = []
    for i in range(2, x+1, 2):
        hand.append((x-i, y+i//2))
    for i in range(2, y+1, 2):
        hand.append((x+i//2, y-i))
    if all(map(solve, hand)):
        memo[(x,y)] = False
    else:
        memo[(x,y)] = True    
    return memo[(x,y)]

def solve2(p):
    x,y = p
    if x > y:
        x,y = y,x
    return not (-1 <= y-x <= 1)



if __name__ == '__main__':
    X,Y = map(int, input().split())
    # print('Alice' if solve((X, Y)) else 'Brown')
    print('Alice' if solve2((X, Y)) else 'Brown')
    # N = 100
    # a = [['Alice' if solve((i, j)) else 'Brown' for j in range(N)] for i in range(N)]
    # for i in range(N):
    #     print('\t'.join(a[i]))
    # for i in range(N):
    #     for j in range(N):
    #         if solve((i, j)) != solve2((i, j)):
    #             print(i,j)
            # print(i,j,'Alice' if solve((i, j)) else 'Brown')

Submission status: Runtime Error

Solution code:
a,b=[int(x) for x in input().split()]
if abs(a-b)<=1:
  	print("Brown"):
else:
  	print("Alice")

Submission status: Runtime Error

Solution code:
a,b=[int(x) for x in input().split()]
if abs(a-b)<=1:
  	print("Brown):
else:
    print("Alice")

Submission status: Runtime Error

Solution code:
x, y =  = map(int,input().split())
if abs(x-y) < 1:
    print('Brown')
else:
    print('Alice')

Submission status: Runtime Error

Solution code:
n,m = map(int(input().split()))
if abs(n-m) < 2:
  print('Brown')
else:
  print('Alice')

Submission status: Runtime Error

Solution code:
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def SI(): return sys.stdin.readline()[:-1]

def main():
    memo={}
    def win(a,b):
        if a>b:a,b=b,a
        if (a,b)==(0,0) or (a,b)==(0,1) or (a,b)==(1,1):return False
        if (a,b) in memo:return memo[a,b]
        for i in range(1,a):
            r=a-i*2
            if r<0:break
            if not win(r,b+i):
                memo[a,b]=True
                return True
        for i in range(1,b):
            r=b-i*2
            if r<0:break
            if not win(r,a+i):
                memo[a,b]=True
                return True
        memo[a, b] = False
        return False

    x,y=MI()
    if win(x,y):print("Alice")
    else:print("Brown")

main()

Submission status: Runtime Error

Solution code:
x,y=map(int,input.split())
if abs(x-y)<=1:
  print('Blown')
else:
  print('Alice')

Submission status: Runtime Error

Solution code:
x, y = input().split()
print('Alice') if (x + y) > 1 else print('Brown')

Submission status: Runtime Error

Solution code:
x, y = map(int, input().split())
 
    if abs(x - y) <= 1:
        print('Brown')
    else:
        print('Alice')

Submission status: Runtime Error

Solution code:
x=int(input())
y=int(input())
if(abs(x-y)<=1):
    print('Brown')
else:
    print('Alice')

Submission status: Runtime Error

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

# 最終状態は(0,1), (1,1)のいずれか
# 最終状態の1手前は勝ち確状態、その1手前は負け確状態
# 1手前に戻すには片方の山からi個石を取り、もう片方の山に2i個加える
# 1手前に戻しつつ山の状態を列挙して、与えられた状態を探索する
# ただし、石の個数の合計が与えられた石の個数の合計を超えたら探索を打ち切る

# 山の状態を再帰的に探索する
def recur_search(x,y,Alice_win_flg):
    if x+y > X+Y or x < 0 or y < 0:
        return
    elif [x, y] in done_memo and Alice_win_flg == 0:
        return
    elif [x,y] == [X,Y] or [x,y] == [Y,X]:
        # 1つでも勝ちパターンがあるなら先手Aliceの勝利
        if Alice_win_flg == 1:
            print("Alice")
            exit()
        else:
            done_memo.append([x, y])
            done_memo.append([y, x])
            return
    else:
        for i in range(1, x+1):
            recur_search(x-i, y+2*i, 1^Alice_win_flg)
            recur_search(y+2*i, x-i, 1^Alice_win_flg)

done_memo = []
recur_search(1,0,0)
recur_search(1,1,0)
print("Brown")

Submission status: Runtime Error

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

# 最終状態は(0,1), (1,1)のいずれか
# 最終状態の1手前は勝ち確状態、その1手前は負け確状態
# 1手前に戻すには片方の山からi個石を取り、もう片方の山に2i個加える
# 1手前に戻しつつ山の状態を列挙して、与えられた状態を探索する
# ただし、石の個数の合計が与えられた石の個数の合計を超えたら探索を打ち切る

# 山の状態を探索し、与えられた状態と一致したらフラグを保存する
def recur_search(x,y,Alice_win_flg):
    if [x,y] == [X,Y] or [x,y] == [Y,X]:
        Alice_win_flg_list.append(Alice_win_flg)
        return
    elif x+y > X+Y or x < 0 or y < 0:
        return
    else:
        for i in range(1, x+1):
            recur_search(x-i, y+2*i, 1^Alice_win_flg)
            recur_search(y+2*i, x-i, 1^Alice_win_flg)

Alice_win_flg_list = []
recur_search(1,0,0)
recur_search(1,1,0)

# 1つでもAlice勝ちパターンがあるなら先手のAliceの勝ち
print("Alice" if sum(Alice_win_flg_list) > 0 else "Brown")