Not Fun Problem
Time limit2sMemory limit1024 MB
Given N and M, build a length-N integer array with values in [0, 10^9] whose contiguous subarray sums cover every value from 0 to M and no value above M.
Problem
This problem is not fun. Most people would skip a problem like this, but you, a contestant, have to solve it.
Given and , find a sequence of length that satisfies all of the following conditions. Such a sequence always exists.
- For every integer with , there exist integers and such that . ()
- For every integer with , there do not exist integers and such that . ()
- For every integer with , .
- Every element of sequence is an integer.
Input
The first line contains two integers and , separated by a space. (; )
Output
Print on the first line, separated by spaces.