시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
2 초 128 MB 259 57 52 29.379%

문제

어린 왕자는 전문적인 해커이다. 어린 왕자는 최근에 n-bit로 이루어진 이진 암호문을 알아내기 위해 혈안이 되어 있다. 이 암호문을 알아내기 위한 단서를 한 가지 얻었는데, n개의 숫자들과 이 암호문을 이용해서 암호화된 숫자를 알아낸 것이다.

암호화된 숫자 K = a1t1 + a2t2 + ... + antn 으로 표현된다. 여기서 t1 ~ tn은 0 또는 1로 우리가 알아내려고 하는 n-bit의 이진 암호문을 순서대로 이루는 숫자들이다.

어린 왕자는 a1 ~ an과 K를 알고 있다. 이진 암호문을 알아내는 프로그램을 작성하시오.

입력

첫째 줄에 bit의 수 n (5 ≤ n ≤ 40)이 주어진다. 둘째 줄부터 n개의 줄에 a1 ~ an이 각 줄에 1개씩 주어진다. 마지막 줄에는 K가 주어진다. a1 ~ an은 모두 자연수이며, n개의 수 전체의 합은 2,000,000,000을 넘지 않는다.

출력

첫째 줄에 n-bit의 이진 암호문을 출력한다. 답이 여러 개일 경우 하나만 출력한다.

예제 입력 1

5
1
2
4
8
16
30

예제 출력 1

01111
W3sicHJvYmxlbV9pZCI6IjIwODciLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWM1NTRcdWQ2MzhcdWJiMzgiLCJkZXNjcmlwdGlvbiI6IjxwPlx1YzViNFx1YjliMCBcdWM2NTVcdWM3OTBcdWIyOTQgXHVjODA0XHViYjM4XHVjODAxXHVjNzc4IFx1ZDU3NFx1Y2VlNFx1Yzc3NFx1YjJlNC4gXHVjNWI0XHViOWIwIFx1YzY1NVx1Yzc5MFx1YjI5NCBcdWNkNWNcdWFkZmNcdWM1ZDAgbi1iaXRcdWI4NWMgXHVjNzc0XHViOGU4XHVjNWI0XHVjOWM0IFx1Yzc3NFx1YzljNCBcdWM1NTRcdWQ2MzhcdWJiMzhcdWM3NDQgXHVjNTRjXHVjNTQ0XHViMGI0XHVhZTMwIFx1YzcwNFx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