Satoru's blog

By Satoru, 17 months ago,

Hello codeforces

Can you help me solve this problem:

Given an array of size $k$, the sum of it's elements is equal to $n$, print a binary string of size $n$ ('$1$' if you can create $i$ by taking a subset from the array, '$0$' otherwise)

Example

UPD: Constraints: $1 <= n, k <= 10^5$

UPD2: thanks imachug for the solution