結果
| 問題 | No.2560 A_1 < A_2 < ... < A_N | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2023-12-02 14:45:40 | 
| 言語 | PyPy3 (7.3.15) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 216 ms / 2,000 ms | 
| コード長 | 765 bytes | 
| コンパイル時間 | 213 ms | 
| コンパイル使用メモリ | 82,304 KB | 
| 実行使用メモリ | 89,088 KB | 
| 最終ジャッジ日時 | 2024-09-26 17:18:18 | 
| 合計ジャッジ時間 | 4,213 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 1 | 
| other | AC * 15 | 
ソースコード
from collections import defaultdict, deque, Counter
import copy
from itertools import combinations, permutations, product, accumulate, groupby, chain
from heapq import heapify, heappop, heappush
import math
import bisect
from pprint import pprint
from random import randint
import sys
# sys.setrecursionlimit(200000)
input = lambda: sys.stdin.readline().rstrip('\n')
inf = float('inf')
mod1 = 10**9+7
mod2 = 998244353
def ceil_div(x, y): return -(-x//y)
#################################################    
def range_sum(n):
    return n*(n+1)//2
T = int(input())
for _ in range(T):
    N, X = map(int, input().split())
    if range_sum(N) > X:
        print(-1)
    else:
        ans = list(range(1, N))
        ans.append(X-range_sum(N-1))
        print(*ans)
            
            
            
        