Integral Pyramid
시간 제한: 2000ms메모리 제한: 512MB출처: UKIEPC 2019BOJ 17802
문제
Pascal’s triangle is a marvel of the combinatorical world, and what’s more you can easily build one for yourself at home.
The lowest row has n numbers. The next row is staggered and has n − 1 numbers, where the ith is the sum of the ith and the i + 1th on the previous row.
You can choose any positive integers for the lowest row, but the single cell on the top row needs to be equal to a given x. Is this possible?
입력
- The only line contains the number of rows, n (1 ≤ n ≤ 20), and the value needed at the top, x (1 ≤ x ≤ 109).
출력
If a pyramid can be constructed, output all of the numbers on each row, starting from the top. Every number must be greater than or equal to 1.
Otherwise, output impossible.
예제
예제 1
입력
3 15
출력
15 8 7 3 5 2
예제 2
입력
6 789
출력
789 394 395 209 185 210 117 92 93 117 70 47 45 48 69 45 25 22 23 25 44
예제 3
입력
20 1
출력
impossible
이 문제는 채점 준비 중입니다. 테스트 데이터가 확보되면 제출이 가능합니다.