Polynomial
시간 제한3초메모리 제한256 MB
차수가 20 이하인 0과 1 계수 다항식 P와 매우 큰 n이 주어질 때, P(x)^n에서 홀수인 계수의 개수를 구한다.
문제
Given a polynomial with coefficients from , print the number of odd coefficients in its -th power.
입력
The first line contains an integer () --- the degree of the polynomial.
The second line contains integers (), denoting the coefficients of from lowest to greatest.
The third line contains an integer ().
출력
Print the answer to the problem in the only line.
힌트
In the first sample test , having all 4 coefficients odd.