CF1772C.Different Differences

普及/提高-

通过率:0%

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

An array aa consisting of kk integers is strictly increasing if a1<a2<<aka_1 < a_2 < \dots < a_k . For example, the arrays [1,3,5][1, 3, 5] , [1,2,3,4][1, 2, 3, 4] , [3,5,6][3, 5, 6] are strictly increasing; the arrays [2,2][2, 2] , [3,7,5][3, 7, 5] , [7,4,3][7, 4, 3] , [1,2,2,3][1, 2, 2, 3] are not.

For a strictly increasing array aa of kk elements, let's denote the characteristic as the number of different elements in the array [a2a1,a3a2,,akak1][a_2 - a_1, a_3 - a_2, \dots, a_k - a_{k-1}] . For example, the characteristic of the array [1,3,4,7,8][1, 3, 4, 7, 8] is 33 since the array [2,1,3,1][2, 1, 3, 1] contains 33 different elements: 22 , 11 and 33 .

You are given two integers kk and nn ( knk \le n ). Construct an increasing array of kk integers from 11 to nn with maximum possible characteristic.

输入格式

The first line contains one integer tt ( 1t8191 \le t \le 819 ) — the number of test cases.

Each test case consists of one line containing two integers kk and nn ( 2kn402 \le k \le n \le 40 ).

输出格式

For each test case, print kk integers — the elements of the strictly increasing array aa with the maximum possible characteristic. If there are multiple answers, print any of them.

输入输出样例

  • 输入#1

    7
    5 9
    4 12
    3 3
    3 4
    4 4
    4 6
    8 11

    输出#1

    1 3 4 7 8
    2 4 7 12
    1 2 3
    1 3 4
    1 2 3 4
    2 4 5 6
    1 2 3 5 6 7 8 11
首页