문제
1 second, 64 MB, 120 points Mirko dreamt of a histogram last night that consists of N columns. Each column is one meter wide and the heights of the columns in meters are h1, h2, ..., hN. The capacity of a histogram is the maximal amount of water that a histogram can hold so that the configuration of the water is "stable", or, in other words, that it doesn’t move un- der the influence of gravity. The image on the right depicts an example of a stable configura- tion. Formally, let us denote the heights of water above the columns with v1, v2, ..., vN. The configuration of the water is stable if the fol- lowing holds:
- hi + vi ⩽hi−1 + vi−1, for each i ⩾2 such
that vi > 0
- hi + vi ⩽hi+1 + vi+1, for each i ⩽N −1
such that vi > 0
- v1 = 0 and vN = 0
When Mirko woke up, he wanted to know whether he could somehow choose the heights of columns that are a permutation of the set {1, 2, ..., N} such that the capacity of such histogram is equal to its lucky number X? Help Mirko and find one histogram that meets his requirements.
입력
The first line of input contains integers N and X (1 ⩽N ⩽1 000 000, 1 ⩽X ⩽1015).
출력
If a histogram of capacity exactly X does not exist, output −1. Otherwise, output numbers h1, h2, ..., hN that meet the given requirements in the first line separated by space. If there are multiple such solu- tions, output any.
예제 입력 1
3 1
예제 출력 1
3 1 2
예제 입력 2
4 1
예제 출력 2
4 3 1 2
예제 입력 3
8 17
예제 출력 3
6 2 3 1 8 4 5 7
이 문제는 현재 제출할 수 없습니다.
이 현상이 잘못되었다고 생각될 경우 관리자한테 문의주세요.