Time limit per test: 0.25 second(s) Memory limit: 65536 kilobytes
input: standard output: standard
Mr. Cucumber was annoyed by pumpkins' dominance in Vegetable Land every Halloween and today he decided to restore justice. He took N peaceful pumpkins hostages and brought them to the hatch of his hutch. Then he numbered the hostages from 1 to N and started throwing them into the hatch one by one (from the 1-st to the N-th), waiting every time until previous hostage falls down. Cucumber's hutch is both-side infinite horizontally, and it has height N. The hutch was empty when Cucumber came. When a pumpkin is thrown into the hatch it has coordinates (0,N). Then it falls by the following rules:
let (x,y) denote current pumpkin's coordinates.
if position (x,y-1) is empty, pumpkin moves there,
else if position (x-1,y) is empty and position (x-1,y-1) is empty too, pumpkin moves to position (x-1,y-1),
else if position (x+1,y) is empty and position (x+1,y-1) is empty too, pumpkin moves to position (x+1,y-1)
Pumpkin moves until it reaches the bottom of the hutch (i.e. its y-coordinate equals to 0) or it can't move anymore.
After that crafty villain demanded Vegetable Land's government to appoint him symbol of Halloween in an hour, otherwise he was going to shoot pumpkins in the hutch in such a way that every pumpkin which y-coordinate equals to H dies.
Some of the hostages taken by Mr. Cucumber are Very Important Pumpkins (VIP), so the government wants to know the exact numbers of pumpkins who are going to be killed to make its decision.
Input contains two integers separated by a single space: N and H (1 ≤ N ≤ 109), (0 ≤ H ≤ 109) — the number of Mr. Cucumber's hostages and y-position of endangered pumpkins.
Print numbers of pumpkins who are going to be killed from the leftmost to the rightmost one, separating them by spaces. It is guaranteed that output will contain at least one number.
5 2 1 3
Codeforces (c) Copyright 2010-2023 Mike Mirzayanov