5335: Just a joke
内存限制:512 MB
时间限制:2.000 S
评测方式:文本比较
命题人:
提交:6
解决:2
题目描述
Alice and Bob are playing a game.
At the beginning, there is an undirected graph G with n nodes.
Alice and Bob take turns to operate, Alice will play first. The player who can't operate will lose the game.
Each turn, the player should do one of the following operations.
A connected component of an undirected graph is a set of nodes such that each pair of nodes is connected by a path, and other nodes in the graph are not connected to the nodes in this set.
For example, for graph with 3 nodes and edge set {(1,2),(2,3),(1,3)}.{1,2,3} is a connected component but {1,2},{1,3} are not.
At the beginning, there is an undirected graph G with n nodes.
Alice and Bob take turns to operate, Alice will play first. The pla
Each turn, the pla
- Select an edge of G and delete it from G.
- Select a connected component of G which doesn't have any loop, then delete it from G.
A connected component of an undirected graph is a set of nodes such that each pair of nodes is connected by a path, and other nodes in the graph are not connected to the nodes in this set.
For example, for graph with 3 nodes and edge set {(1,2),(2,3),(1,3)}.{1,2,3} is a connected component but {1,2},{1,3} are not.
输入
The first line has two integers n,m.
Then there are m lines, each line has two integers (u,v) describe an edge in G.
1≤n≤100,0≤m≤min(200,n(n−1)/2)
It's guaranteed that graph G doesn't have self loop and multiple edge.
Then there are m lines, each line has two integers (u,v) describe an edge in G.
1≤n≤100,0≤m≤min(200,n(n−1)/2)
It's guaranteed that graph G doesn't have self loop and multiple edge.
输出
Output the name of the player who will win the game.
样例输入 复制
3 1
1 2
样例输出 复制
Bob