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: Wrong Answer

Solution code:
a, b = input().split(' ')
a, b = int(a), int(b)
#a, b = 4, 8
count = 0
ab = [a, b]
if sum(ab) > 8  and a != 1 and b != 1:
    print('Alice')
else:
        
    while ab != [0, 1] and ab != [0, 0] and ab != [1, 1] and ab != [1, 0]:
        a = max(ab)
        b = min(ab)
        rem = a/2
        if rem % 2 != 0:
            rem = (a+1)/2
        if rem % 2 != 0:
            rem =(a+2)/2
        if rem % 2 != 0:
            rem = (a+3)/2
            
        a = a - rem
        b += rem/2
        ab = [int(b), int(a)]
        print(ab)
        count += 1

    if count % 2 != 0:
        print('Alice')
    else:
        print('Brown')

Submission status: Wrong Answer

Solution code:
a, b = input().split(' ')
a, b = int(a), int(b)
#a, b = 4, 8
count = 0
ab = [a, b]
if sum(ab) > 5:
    print('Alice')
else:
        
    while ab != [0, 1] and ab != [0, 0] and ab != [1, 1] and ab != [1, 0]:
        a = max(ab)
        b = min(ab)
        rem = a/2
        if rem % 2 != 0:
            rem = (a+1)/2
        if rem % 2 != 0:
            rem =(a+2)/2
        if rem % 2 != 0:
            rem = (a+3)/2
            
        a = a - rem
        b += rem/2
        ab = [int(b), int(a)]
        print(ab)
        count += 1

    if count % 2 != 0:
        print('Alice')
    else:
        print('Brown')

Submission status: Wrong Answer

Solution code:
a, b = input().split(' ')
a, b = int(a), int(b)
#a, b = 4, 8
count = 0
ab = [a, b]
if sum(ab) > 6:
    print('Alice')
elif a==1 and sum(ab) > 6 or b==1 and sum(ab) > 6:
    print('Brown')
else:
        
    while ab != [0, 1] and ab != [0, 0] and ab != [1, 1] and ab != [1, 0]:
        a = max(ab)
        b = min(ab)
        rem = a/2
        if rem % 2 != 0:
            rem = (a+1)/2
        if rem % 2 != 0:
            rem =(a+2)/2
        if rem % 2 != 0:
            rem = (a+3)/2
            
        a = a - rem
        b += rem/2
        ab = [int(b), int(a)]
        print(ab)
        count += 1

    if count % 2 != 0:
        print('Alice')
    else:
        print('Brown')

Submission status: Wrong Answer

Solution code:
a, b = input().split(' ')
a, b = int(a), int(b)
#a, b = 4, 8
count = 0
ab = [a, b]
if sum(ab) > 6:
    print('Alice')
elif a==1 and b%4 ==0 or b==1 and a%4 ==0:
    print('Brown')
else:
        
    while ab != [0, 1] and ab != [0, 0] and ab != [1, 1] and ab != [1, 0]:
        a = max(ab)
        b = min(ab)
        rem = a/2
        if rem % 2 != 0:
            rem = (a+1)/2
        if rem % 2 != 0:
            rem =(a+2)/2
        if rem % 2 != 0:
            rem = (a+3)/2
            
        a = a - rem
        b += rem/2
        ab = [int(b), int(a)]
        print(ab)
        count += 1

    if count % 2 != 0:
        print('Alice')
    else:
        print('Brown')

Submission status: Wrong Answer

Solution code:
a, b = input().split(' ')
a, b = int(a), int(b)
#a, b = 4, 8
count = 0
ab = [a, b]
if sum(ab) > 6:
    print('Alice')
else:
        
    while ab != [0, 1] and ab != [0, 0] and ab != [1, 1] and ab != [1, 0]:
        a = max(ab)
        b = min(ab)
        rem = a/2
        if rem % 2 != 0:
            rem = (a+1)/2
        if rem % 2 != 0:
            rem =(a+2)/2
        if rem % 2 != 0:
            rem = (a+3)/2
            
        a = a - rem
        b += rem/2
        ab = [int(b), int(a)]
        print(ab)
        count += 1

    if count % 2 != 0:
        print('Alice')
    else:
        print('Brown')

Submission status: Wrong Answer

Solution code:
a, b = input().split(' ')
a, b = int(a), int(b)
#a, b = 4, 8
count = 0
ab = [a, b]
if sum(ab) > 8:
    print('Alice')
else:
        
    while ab != [0, 1] and ab != [0, 0] and ab != [1, 1] and ab != [1, 0]:
        a = max(ab)
        b = min(ab)
        rem = a/2
        if rem % 2 != 0:
            rem = (a+1)/2
        if rem % 2 != 0:
            rem =(a+2)/2
        if rem % 2 != 0:
            rem = (a+3)/2
            
        a = a - rem
        b += rem/2
        ab = [int(b), int(a)]
        print(ab)
        count += 1

    if count % 2 != 0:
        print('Alice')
    else:
        print('Brown')

Submission status: Wrong Answer

Solution code:
a, b = input().split(' ')
a, b = int(a), int(b)
#a, b = 4, 8
count = 0
ab = [a, b]

while ab != [0, 1] and ab != [0, 0] and ab != [1, 1] and ab != [1, 0]:
    a = max(ab)
    b = min(ab)
    rem = a/2
    if rem % 2 != 0:
        rem = (a+1)/2
    if rem % 2 != 0:
        rem =(a+2)/2
    if rem % 2 != 0:
        rem = (a+3)/2
        
    a = a - rem
    b += rem/2
    ab = [int(b), int(a)]
    print(ab)
    count += 1

if count % 2 != 0:
    print('Alice')
else:
    print('Brown')

Submission status: Wrong Answer

Solution code:
[x,y]=[int(i) for i in input().split()]
if x==y:
   s="Brown"

elif x==1 :
  if int((y-1)/2)%2==1:
    s="Alice"
  else:
    s="Brown"
elif y==1 :
  if int((x-1)/2)%2==1:
    s="Alice"
  else:
    s="Brown"
else:
  s="Alice"
if x<=1 and y<=1:
  s="Brown"
print(s)

Submission status: Wrong Answer

Solution code:
def alice(x, y):
    return turn(x, y)

def brown(x, y):
    return turn(x, y)

def turn(x, y):
    a = 0
    if x < y or x == y:
        a = int(y / 2)
        y = y - a * 2
        x = a + x
    else:
        a = int(x / 2)
        x = x - a * 2
        y = a + y
    if a == 0:
        return [False, x, y]
    return [True, x, y]


nums = input().split(" ")
x = int(nums[0])
y = int(nums[1])
while True:
    result, x, y = alice(x, y)
    if result == False:
        print('Brown')
        break
    result, x, y = brown(x, y)
    if result == False:
        print('Alice')
        break

Submission status: Wrong Answer

Solution code:
def alice(x, y):
    return turn(x, y)

def brown(x, y):
    return turn(x, y)

def turn(x, y):
    a = 0
    if x < y or x == y:
        a = int(y / 2)
        y = y - a * 2
        x = a
    else:
        a = int(x / 2)
        x = x - a * 2
        y = a
    print(a)
    if a == 0:
        return [False, x, y]
    return [True, x, y]


nums = input().split(" ")
x = int(nums[0])
y = int(nums[1])
while True:
    print("alice")
    result, x, y = alice(x, y)
    if result == False:
        print('Brown')
        break
    print('brown')
    result, x, y = brown(x, y)
    if result == False:
        print('Alice')
        break

Submission status: Wrong Answer

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

turn = 1
while 1:
    if x <= 1 and y <= 1:
        if turn == 1:
            print("Brown")
        else:
            print("Alice")
        break
    if x > y:
        y += x // 2
        x %= 2
    else:
        x += y // 2
        y %= 2
    turn ^= 1

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
[x,y]=[int(i) for i in input().split()]
if x==y:
  if int((x-1)/2)%2==0:
   s="Brown"
  else:
   s="Alice"
elif x<=1 :
  if y%2==1:
    s="Alice"
  else:
    s="Brown"
elif y<=1 :
  if x%2==1:
    s="Alice"
  else:
    s="Brown"
else:
  s="Alice"
if x<=1 and y<=1:
  s="Brown"
print(s)

Submission status: Wrong Answer

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

s = X + Y
if X % 2 == 0 and Y % 2 == 0 and s != 0:
    print("Alice")
    quit()
isAlice = True
while s > 1:
    if X > Y:
        if X % 2 == 0:
            Y += int(X / 2)
            X = 0
        else:
            Y += int((X-1)/2)
            X = 1
    else:
        if Y % 2 == 0:
            X += int(Y / 2)
            Y = 0
        else:
            X += int((Y-1) / 2)
            Y = 1
    isAlice = not isAlice
    s = X + Y
#    print(str(X) + " " + str(Y))
if isAlice:
    print("Brown")
else:
    print("Alice")

Submission status: Wrong Answer

Solution code:
[x,y]=[int(i) for i in input().split()]
if x==y:
  if int((x-1)/2)%2==0:
   s="Brown"
  else:
   s="Alice"
elif x==1 :
  if y%2==1:
    s="Alice"
  else:
    s="Brown"
elif y==1 :
  if x%2==1:
    s="Alice"
  else:
    s="Brown"
else:
  s="Alice"
if x<=1 and y<=1:
  s="Brown"
print(s)

Submission status: Wrong Answer

Solution code:
[x,y]=[int(i) for i in input().split()]
if x==y:
  if int((x-1)/2)%2==0:
   s="Brown"
  else:
   s="Alice"
elif x==1 :
  if int((y-1)/2)%2==1:
    s="Alice"
  else:
    s="Brown"
elif y==1 :
  if int((x-1)/2)%2==1:
    s="Alice"
  else:
    s="Brown"
else:
  s="Alice"
if x<=1 and y<=1:
  s="Brown"
print(s)

Submission status: Wrong Answer

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

s = X + Y
isAlice = True
while s > 1:
    if X > Y:
        if X % 2 == 0:
            Y += int(X / 2)
            X = 0
        else:
            Y += int((X-1)/2)
            X = 1
    else:
        if Y % 2 == 0:
            X += int(Y / 2)
            Y = 0
        else:
            X += int((Y-1) / 2)
            Y = 1
    isAlice = not isAlice
    s = X + Y
    print(str(X) + " " + str(Y))
if isAlice:
    print("Brown")
else:
    print("Alice")

Submission status: Wrong Answer

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

a,b = map(int,raw_input().split(" "))

num = 0

while(a>2 or b>2):
	if(a<=b):
		tmp = a
		a = b
		b = tmp
	b = b + a/2
	a = a%2


	if(a<=b):
		tmp = a
		a = b
		b = tmp

	num = num + 1


if(num%2==0):
	print "Brown"

elif(num%2==1):
	print "Alice"

Submission status: Wrong Answer

Solution code:
import numpy as np

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

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())
count = 0
while x > 2 or y > 2:
    if x >= y:
        a = (x / 2) * 2
        x -= a
        y += a / 2
        count += 1

    else:
        a = (y / 2) * 2
        y -= a
        x += a / 2
        count += 1

if count % 2 == 0:
    print("Brown")
else:
    print("Alice")

Submission status: Wrong Answer

Solution code:
l, r = map(int, raw_input().split())

idx = 0
while True:

    if idx % 2 == 0:
        i = l/2
        if i == 0:
            break
        l -= i*2
        r += i
    else:
        i = r/2
        if i == 0:
            break
        r -= i*2
        l += i

    idx += 1

if idx % 2 == 0:
    print "Brown"
else:
    print "Alice"

Submission status: Time Limit Exceeded

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float("inf")
mod = 10 ** 9 + 7

X, Y = MAP()

def grundy(a, b):
	if 0 <= a <= 1 and 0 <= b <= 1:
		return 0

	s = set()
	if a >= 2:
		i = a//2
		s.add(grundy(a%2, b+i))
		if a >= 4:
			s.add(grundy(a%2+2, b+(i-1)))
	if b >= 2:
		i = b//2
		s.add(grundy(a+i, b%2))
		if b >= 4:
			s.add(grundy(a+(i-1), b%2+2))

	ret = 0
	while ret in s:
		ret += 1

	return ret

print("Alice" if grundy(X, Y) else "Brown")

Submission status: Time Limit Exceeded

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

memo = [[[-1, -1] for _ in range(X + Y + 1)] for _ in range(X + Y + 1)]
def search(x, y, person):
    if x <= 1 and y <= 1:
        return False if person == 0 else True

    if x == 2 and y == 0 or x == 0 and y == 2:
        return True if person == 0 else False

    if memo[y][x][person] != -1:
        return memo[y][x][person]

    ret = False
    for i in range(2, x + 1, 2):
        ret |= search(x - i, y + i // 2, 1 if person == 0 else 0)
    for i in range(2, y + 1, 2):
        ret |= search(x + i // 2, y - i, 1 if person == 0 else 0)

    memo[y][x][person] = ret
    return ret

ans = search(X, Y, 0)
print('Alice' if ans else 'Brown')

Submission status: Time Limit Exceeded

Solution code:
import sys
sys.setrecursionlimit(10**9)

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

def rec(x, y) :
    flg = False
    for i in range(2, x + 1, 2) :
        flg = flg or not rec(x-i, y+i//2)
    for i in range(2, y + 1, 2) :
        flg = flg or not rec(x+i//2, y-i)
        
    return flg
    
if rec(X, Y) :
    print('Alice')
else :
    print('Brown')

Submission status: Time Limit Exceeded

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

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

while True:
	if A == 0 and B == 0:
		print("Brown")
		break
	
	while A > 1:
		A -= 2
		B += 1
	
	while B > 1:
		B -= 2
		A += 1
	
	if A == 1 and B == 0:
		print("Brown")
		break
	elif A == 0 and B == 1:
		print("Alice")
		break

Submission status: Time Limit Exceeded

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

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

while True:
	while A > 1:
		A -= 2
		B += 1
	else:
		if B == 0:
			print("Brown")
			break
	
	while B > 1:
		B -= 2
		A += 1
	else:
		if A == 0:
			print("Alice")
			break

Submission status: Time Limit Exceeded

Solution code:
x, y = map(int, input().split())
count = 0
while x > 2 or y > 2:
    if (x % 2 == 1 and y % 2  == 1) or (x % 2 == 0 and y % 2  == 0)  : 
    
        if x >= y:
            a = (x / 2) * 2
            x -= a
            y += a / 2
            count += 1
    
        else:
            a = (y / 2) * 2
            y -= a
            x += a / 2
            count += 1
    elif x % 2 == 0:
        a = (x / 2) * 2
        x -= a
        y += a / 2
        count += 1
    elif y % 2 == 0:
        a = (y / 2) * 2
        y -= a
        x += a / 2
        count += 1
        
        

if count % 2 == 0:
    print("Brown")
else:
    print("Alice")

Submission status: Accepted

Solution code:
a,b=[int(x) for x in input().split()]
if abs(a-b)<=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 X<Y:
    X,Y=Y,X
    
print('Brown' if (X-1<=Y and Y<=X+1) else 'Alice')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
def MI(): return map(int,sys.stdin.readline().rstrip().split())


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

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10**7)
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int,sys.stdin.readline().rstrip().split())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))  #空白あり
def LI2(): return list(map(int,sys.stdin.readline().rstrip()))  #空白なし
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())  #空白あり
def LS2(): return list(sys.stdin.readline().rstrip())  #空白なし


X,Y = MI()
print('Alice' if abs(X-Y) >= 2 else '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:
# -*- coding: utf-8 -*-

#############
# Libraries #
#############

import sys
input = sys.stdin.readline

import math
#from math import gcd
import bisect
import heapq
from collections import defaultdict
from collections import deque
from collections import Counter
from functools import lru_cache

#############
# Constants #
#############

MOD = 10**9+7
INF = float('inf')
AZ = "abcdefghijklmnopqrstuvwxyz"

#############
# Functions #
#############

######INPUT######
def I(): return int(input().strip())
def S(): return input().strip()
def IL(): return list(map(int,input().split()))
def SL(): return list(map(str,input().split()))
def ILs(n): return list(int(input()) for _ in range(n))
def SLs(n): return list(input().strip() for _ in range(n))
def ILL(n): return [list(map(int, input().split())) for _ in range(n)]
def SLL(n): return [list(map(str, input().split())) for _ in range(n)]


#####Shorten#####
def DD(arg): return defaultdict(arg)

#####Inverse#####
def inv(n): return pow(n, MOD-2, MOD)

######Combination######
kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n): return kaijo_memo[n]
  if(len(kaijo_memo) == 0): kaijo_memo.append(1)
  while(len(kaijo_memo) <= n): kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n): return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0): gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n): gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if n == r: return 1
  if n < r or r < 0: return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret

######Factorization######
def factorization(n):
  arr = []
  temp = n
  for i in range(2, int(-(-n**0.5//1))+1):
    if temp%i==0:
      cnt=0
      while temp%i==0: 
        cnt+=1 
        temp //= i
      arr.append([i, cnt])
  if temp!=1: arr.append([temp, 1])
  if arr==[]: arr.append([n, 1])
  return arr

#####MakeDivisors######
def make_divisors(n):
  divisors = []
  for i in range(1, int(n**0.5)+1):
    if n % i == 0:
      divisors.append(i)
      if i != n // i: 
        divisors.append(n//i)
  return divisors

#####MakePrimes######
def make_primes(N):
  max = int(math.sqrt(N))
  seachList = [i for i in range(2,N+1)]
  primeNum = []
  while seachList[0] <= max:
    primeNum.append(seachList[0])
    tmp = seachList[0]
    seachList = [i for i in seachList if i % tmp != 0]
  primeNum.extend(seachList)
  return primeNum

#####GCD#####
def gcd(a, b):
    while b: a, b = b, a % b
    return a

#####LCM#####
def lcm(a, b):
    return a * b // gcd (a, b)

#####BitCount#####
def count_bit(n):
  count = 0
  while n:
    n &= n-1
    count += 1
  return count

#####ChangeBase#####
def base_10_to_n(X, n):
  if X//n: return base_10_to_n(X//n, n)+[X%n]
  return [X%n]

def base_n_to_10(X, n):
  return sum(int(str(X)[-i-1])*n**i for i in range(len(str(X))))

def base_10_to_n_without_0(X, n):
  X -= 1
  if X//n: return base_10_to_n_without_0(X//n, n)+[X%n]
  return [X%n]

#####IntLog#####
def int_log(n, a):
  count = 0
  while n>=a:
    n //= a
    count += 1
  return count

#############
# Main Code #
#############

X,Y = IL()
if abs(X-Y)>=2:
  print("Alice")
else:
  print("Brown")

Submission status: Accepted

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

if X+Y<=1:
    print("Brown")

else:
    n=X-Y
    if n<0:
        n=(-1)*n
    
    if n<=1:
        print("Brown")
    else:
        print("Alice")

Submission status: Accepted

Solution code:
import sys
from collections import *
import heapq
import math
import bisect
from itertools import permutations,accumulate,combinations,product
from fractions import gcd
def input():
    return sys.stdin.readline()[:-1]
def ruiseki(lst):
    return [0]+list(accumulate(lst))
mod=pow(10,9)+7
al=[chr(ord('a') + i) for i in range(26)]

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("Alice" if abs(x - y) > 1 else "Brown")

Submission status: Accepted

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

# abs(x - y) <= 1 → abs(x - y) >= 2
# abs(x - y) >= 2 → abs(x - y) <= 1

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("Alice" if abs(X - Y) > 1 else "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
from itertools import accumulate
def input(): return sys.stdin.readline().strip()

def main():
    X, Y = map(int, input().split())
    """
    必勝法は「相手に山の差が１になるようにターンを渡すこと」
    そしたら相手がどんな操作をしてきても再び山の差を１にできるので、
    最終的には(0, 0), (0, 1), (1, 0)のどれかの状態を相手にわたすことになる。

    これどうやったら気づけるの？定常状態があるのがこの手の問題の定石？
    """
    if abs(X - Y) <= 1:
        print("Brown")
    else:
        print("Alice")
    

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")


x,y = list(map(int, input().split()))
# n = 12
# t = [[None]*n for _ in range(n)]
# t[0][0] = t[1][0] = t[1][1] = t[0][1] = 0
# t[2][0] = t[0][2] = 1
# if t[x][y] is not None:
#     ans = t[x][y]
# else:
#     l = [0,1,1]
#     ans = l[(y-(x%3))%3]
if abs(x-y)<=1:
    print("Brown")
else:
    print("Alice")

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.buffer.readline

#sys.setrecursionlimit(10**9)
#from functools import lru_cache

def RD(): return input().rstrip().decode()
def II(): return int(input())
def FI(): return int(input())
def MI(): return map(int,input().split())
def MF(): return map(float,input().split())
def LI(): return list(map(int,input().split()))
def LF(): return list(map(float,input().split()))
def TI(): return tuple(map(int,input().split()))
# rstrip().decode()


def main():
	x,y=MI()
	a=abs(x-y)
	print("Brown" if a<=1 else "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:
# 1: starting from there, P1 wins (who starts)
# 0: P0 wins (who doesn't start)
# 
# 0 0 1 1 1 1 1
# 0 0 0 1 1
# 1 0 0 0 
# 1 1 0
# 1 1
# 1
# 1
# |X-Y| <= 1 : 0
# |X-Y| >  1 : 1
## X-Y: must change by 3
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())
print('Alice' if abs(X-Y) > 1 else 'Brown')

Submission status: Accepted

Solution code:
print('ABlriocwen'[-2<eval(input().replace(*' -'))<2::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:
def getN():
    return int(input())
def getNM():
    return map(int, input().split())
def getList():
    return list(map(int, input().split()))
def getArray(intn):
    return [int(input()) for i in range(intn)]
def input():
    return sys.stdin.readline().rstrip()
def rand_N(ran1, ran2):
    return random.randint(ran1, ran2)
def rand_List(ran1, ran2, rantime):
    return [random.randint(ran1, ran2) for i in range(rantime)]
def rand_ints_nodup(ran1, ran2, rantime):
  ns = []
  while len(ns) < rantime:
    n = random.randint(ran1, ran2)
    if not n in ns:
      ns.append(n)
  return sorted(ns)

def rand_query(ran1, ran2, rantime):
  r_query = []
  while len(r_query) < rantime:
    n_q = rand_ints_nodup(ran1, ran2, 2)
    if not n_q in r_query:
      r_query.append(n_q)
  return sorted(r_query)

from collections import defaultdict, deque, Counter
from sys import exit
from decimal import *
import heapq
from math import sqrt, pi
from fractions import gcd
import random
import string
import copy
from itertools import combinations, permutations, product
from operator import mul, itemgetter
from functools import reduce
from bisect import bisect_left, bisect_right

import sys
sys.setrecursionlimit(1000000000)
mod = 10 ** 9 + 7

#############
# Main Code #
#############

X, Y = getNM()
X = int(X)
Y = int(Y)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

def main():
    x,y=map(int,input().split())
    s=2*x+y
    t=2*y+x
    if s//3-(s%3==0)==t//3-(t%3==0):
        print('Brown')
    else:
        print('Alice')

if __name__=='__main__':
    main()

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, open(0).read().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=map(int,input().split())
if abs(x-y)<=1:
  print("Brown")
else:
  print("Alice")

Submission status: Accepted

Solution code:
#from collections import deque,defaultdict
printn = lambda x: print(x,end='')
inn = lambda : int(input())
inl   = lambda: list(map(int, input().split()))
inm   = lambda:      map(int, input().split()) 
ins = lambda : input().strip()
DBG = True # and False
BIG = 10**18
R = 10**9 + 7
#R = 998244353

def ddprint(x):
  if DBG:
    print(x)

x,y = inm()
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:
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10000000)
MOD = 10 ** 9 + 7
INF = 10 ** 15

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:
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())
print(['Alice','Brown'][abs(X-Y)<2])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x,y=map(int, input().split())
print("Brown"if abs(x-y)<2else"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)<=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())
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, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce, lru_cache
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float("inf")
mod = 10 ** 9 + 7

X, Y = MAP()
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('Alice')
else:
    print('Brown')

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
from collections import *

def dfs(x, y):
    res = False
    
    for i in range(2, x+1, 2):
        res |= not dfs(x-i, y+i//2)
    
    for i in range(2, y+1, 2):
        res |= not dfs(x+i//2, y-i)
    
    return res

"""
for i in range(5):
    for j in range(5):
        print(dfs(i, j), end=' ')
    print()
"""

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 = 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 y > x:
    x,y = y,x

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

Submission status: Accepted

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

if X >= Y+2:
  print('Alice')
elif X <= Y-2:
  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:
def main():
    X, Y = list(map(int, input().split(' ')))
    if abs(X - Y) > 1:
        print('Alice')
    else:
        print('Brown')


if __name__ == '__main__':
    main()