結果

問題 No.2560 A_1 < A_2 < ... < A_N
ユーザー YuuuTYuuuT
提出日時 2023-12-02 15:25:29
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 156 ms / 2,000 ms
コード長 725 bytes
コンパイル時間 513 ms
コンパイル使用メモリ 82,392 KB
実行使用メモリ 89,216 KB
最終ジャッジ日時 2024-09-26 18:39:57
合計ジャッジ時間 3,096 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 15
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys,math
#if len(sys.argv)==2:sys.stdin=open(sys.argv[1])
from collections import defaultdict,deque
from itertools import combinations,permutations,accumulate,product
from bisect import bisect,bisect_left,bisect_right
from heapq import heappop,heappush,heapify
#from sortedcontainers import SortedList,SortedSet
def input(): return sys.stdin.readline().rstrip()
def ii(): return int(input())
def ms(): return map(int, input().split())
def li(): return list(map(int,input().split()))
T = ii()
for _ in range(T):
  N,X = ms()
  ans = list()
  S = 0
  ng = False
  for i in range(1,N+1):
    S += i
    if S>X:
      print(-1)
      ng = True
      break
    ans.append(i)
  if ng: continue
  ans[-1] += X-S
  print(*ans)
0