cf/mirror

Tree and Permutation Game

CF
1659F3000· legendary gm1s256 MB⌨ stdin/stdout

Examples

Sample 1of 2multi-test • hover to link
Input
3
6 3
1 3
3 2
4 3
3 6
5 3
2 1 3 6 4 5
3 2
1 2
3 2
1 3 2
3 2
1 2
3 2
1 2 3
Output
Alice
Bob
Alice
Sample 2of 2multi-test • hover to link
Input
1
11 4
3 11
5 9
10 3
4 8
2 4
1 8
6 8
8 7
4 5
5 11
7 4 9 8 6 5 11 10 2 3 1
Output
Alice
1659F.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…