logo AlgoBeat OnlineJudge
登录 注册

#210344. [ICPC 2024 Xi'an I] XOR Game

内存限制:512 MiB 时间限制:1000 ms 标准输入输出
题目类型:VJudge(洛谷) 评测方式:VJudge
上传者: 匿名

题目描述

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

1 0
3

样例输出 1

1

样例输入 2

2 0
2 1

样例输出 2

11

样例输入 3

2 0
2 2

样例输出 3

00