Time limit
2s
Memory limit
128 MB
You need to find an n-bit binary ciphertext. The ciphertext consists of t1, t2, ..., tn in order, and each ti is either 0 or 1.
Positive integers a1, a2, ..., an and an encrypted value K are given. They satisfy the following equation.
K = a1t1 + a2t2 + ... + antn
Find an n-bit binary string that satisfies the condition.
The first line contains the number of bits n (5 <= n <= 40).
The next n lines contain a1, a2, ..., an in order, one number per line.
The last line contains K. Every ai is a positive integer, and the sum of all n numbers does not exceed 2,000,000,000.
Print an n-bit binary string that satisfies the condition. If there are multiple answers, print any one of them.