Waiter and tips

0

0 votes
Problem

There are waiters working in a restaurant who work under their smart manager panik. A customer left a hefty tip of K. Now all waiters are having a fight about who would get a larger share of the tip. Panik saw this and devised an algorithm for this purpose. He said, First the oldest among all waiters would suggest a distribution of amount. If this proposal gets accepted, then all waiters shall get the amount proposed by him. For this proposal to get accepted, at least 50% of waiters must say YES to this distribution. If rejected, the oldest waiter will be removed from the distribution and now the 2nd oldest waiter will propose a strategy for the remaining N-1 waiters. This loop would go on until a proposal is accepted.

Assume all waiters are very smart and play this algorithm very smartly.


INPUT

First and the only line contains two integers K  N 


OUTPUT

Print the distribution strategy that would be accepted, i.e print N elements in a single line showing the amount received by each waiter from oldest to youngest where the first element of output refers to the oldest waiter.


CONSTRAINTS

1<=K<=1000

1<=N<=K

Time Limit: 1
Memory Limit: 256
Source Limit:
Explanation

The oldest waiter suggests this proposal, and it gets accepted because the oldest waiter would already be in favour of his proposal, and now he only needs 1 more vote. This vote comes from the youngest waiter because he knows that if he rejects the proposal, then the second oldest waiter would make the proposal, which would definitely get accepted as out of 2 people 1 is favour(2nd oldest itself), so it makes 50% of the votes, so he would get 0 coins. So instead of that, he accepts the proposal of the oldest waiter to get 1 coin.

Editor Image

?