logo AlgoBeat OnlineJudge
登录 注册

#214252. [SCCPC 2021] K-skip Permutation

内存限制:256 MiB 时间限制:1000 ms 标准输入输出
题目类型:VJudge(洛谷) 评测方式:VJudge
上传者: 匿名

题目描述

For a permutation of , let be the number of satisfying and .

Given two integers and , your task is to find a permutation of such that is maximized.

Recall that in a permutation of , each integer from to (both inclusive) appears exactly once.

输入格式

There is only one test case in each test file.

The first and only line contains two integers and ().

输出格式

Output one line containing integers indicating a permutation of that maximizes . If there are multiple valid answers you can output any of them.

Please, DO NOT output extra spaces at the end of the line, or your answer may be considered incorrect!

样例

样例输入 1

3 1

样例输出 1

1 2 3

样例输入 2

7 3

样例输出 2

2 5 1 4 7 3 6

样例输入 3

3 7

样例输出 3

1 3 2