logo AlgoBeat OnlineJudge
登录 注册

#216923. [NWERC 2018] Hard Drive

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

题目描述

Pia is getting ready for her flight to the NWERC 2018 in Eindhoven. As she is packing her hard drive, she remembers the airline's ridiculous weight restrictions, which may pose a problem.

The hard drive is essentially a string of ones and zeros, and its weight depends on the number of “bit changes” in it: for any two adjacent bits storing two different values, the hard drive gets slightly heavier.

To make matters worse, the drive is so old that some bits are already broken and will always store zeros. The first bit will never be broken, but the last bit will always be.

Pia is now trying to modify the information on the hard drive so that it has exactly the maximum number of bit changes permitted by the airline. Find a bit pattern which can be stored on the hard drive and has exactly the desired number of bit changes.

输入格式

The input consists of:

  • One line with three integers (, ), the size of the hard drive in bits, the desired amount of bit changes, and the number of broken bits.
  • One line with integers (), the positions of the broken bits.

输出格式

Output a bit string of length , representing Pia's hard drive and containing exactly bit changes. If there are multiple valid solutions, you may output any one of them. It is guaranteed that at least one solution exists.

样例

样例输入 1

5 2 3
2 3 5

样例输出 1

00010

样例输入 2

7 4 2
2 7

样例输出 2

0010110