AtCoder Regular Contest 087
翻译中…
Problem Statement
翻译中…
For strings $s$ and $t$, we will say that $s$ and $t$ are prefix-free when neither is a prefix of the other.
翻译中…
Let $L$ be a positive integer. A set of strings $S$ is a good string set when the following conditions hold true:
翻译中…
- Each string in
$S$has a length between$1$and$L$(inclusive) and consists of the characters0and1. - Any two distinct strings in
$S$are prefix-free.
翻译中…
We have a good string set $S = \{ s_1, s_2, ..., s_N \}$. Alice and Bob will play a game against each other. They will alternately perform the following operation, starting from Alice:
翻译中…
- Add a new string to
$S$. After addition,$S$must still be a good string set.
翻译中…
The first player who becomes unable to perform the operation loses the game. Determine the winner of the game when both players play optimally.
翻译中…
Constraints
翻译中…
$1 \leq N \leq 10^5$$1 \leq L \leq 10^{18}$$s_1$,$s_2$, ...,$s_N$are all distinct.- {
$s_1$,$s_2$, ...,$s_N$} is a good string set. $|s_1| + |s_2| + ... + |s_N| \leq 10^5$
翻译中…
Input
翻译中…
Input is given from Standard Input in the following format:
翻译中…
N L
s_1
s_2
:
s_N
翻译中…
Output
翻译中…
If Alice will win, print Alice; if Bob will win, print Bob.
翻译中…
样例
Input #1
2 2
00
01
Output #1
Alice
If Alice adds `1`, Bob will be unable to add a new string.
Input #2
2 2
00
11
Output #2
Bob
There are two strings that Alice can add on the first turn: `01` and `10`. In case she adds `01`, if Bob add `10`, she will be unable to add a new string. Also, in case she adds `10`, if Bob add `01`, she will be unable to add a new string.
Input #3
3 3
0
10
110
Output #3
Alice
If Alice adds `111`, Bob will be unable to add a new string.
Input #4
2 1
0
1
Output #4
Bob
Alice is unable to add a new string on the first turn.
Input #5
1 2
11
Output #5
Alice
Input #6
2 3
101
11
Output #6
Bob
题目信息
题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。