#P10558. [ICPC2024 Xi'an I] XOR Game
[ICPC2024 Xi'an I] XOR Game
题目背景
statement updated:
is the number of numbers whose values are .
题目描述
Alice and Bob are playing a game against each other.
In front of them are a multiset of non-negative integers and a single integer . Each number in is or before the game.
This game will be a turn-based game, and Alice will go first. In one person's turn, he or she will choose an integer from . Let this number be . Then this person will choose whether or not to make , then remove from . Here, operation means bitwise xor.
Alice wants to make as big as possible, and Bob wants to make as small as possible.
You are a bystander who wants to know the final value of . However, the size of is a huge number. Formally, there are numbers whose values are in for all , and numbers whose values are . But you still want to challenge this impossible problem.
If Alice and Bob are smart enough, please output the final value of .
输入格式
The first line contains two integers .
The next line contains integers, the -th integer is .
输出格式
Output the answer in binary format. Note that you should output exactly digit from high to low even though this number has leading s.
1 0
3
1
2 0
2 1
11
2 0
2 2
00