結果

問題 No.2560 A_1 < A_2 < ... < A_N
ユーザー ch1channnch1channn
提出日時 2023-12-02 15:15:12
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 318 ms / 2,000 ms
コード長 800 bytes
コンパイル時間 145 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 88,364 KB
最終ジャッジ日時 2023-12-02 15:15:21
合計ジャッジ時間 3,512 ms
ジャッジサーバーID
(参考情報)
judge15 / judge10
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
53,460 KB
testcase_01 AC 70 ms
83,412 KB
testcase_02 AC 80 ms
85,952 KB
testcase_03 AC 75 ms
88,276 KB
testcase_04 AC 85 ms
88,220 KB
testcase_05 AC 82 ms
88,364 KB
testcase_06 AC 261 ms
76,212 KB
testcase_07 AC 304 ms
77,132 KB
testcase_08 AC 307 ms
77,692 KB
testcase_09 AC 318 ms
77,456 KB
testcase_10 AC 285 ms
77,020 KB
testcase_11 AC 35 ms
53,460 KB
testcase_12 AC 41 ms
59,580 KB
testcase_13 AC 35 ms
53,460 KB
testcase_14 AC 36 ms
53,460 KB
testcase_15 AC 44 ms
62,340 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
if sys.platform =='ios':
	import clipboard
	a=clipboard.get()
	a = a.split('\n')
	text = '\n'.join(a)
	with open('input_file.txt','w') as f:
		f.write(text)
	sys.stdin = open('input_file.txt')
sys.setrecursionlimit(410000000)
stdin = sys.stdin 
def ni():return int(ns())
def na():return list(map(int, stdin.readline().split()))
def ns():return stdin.readline().strip()
def nm():return map(int,input().split())
def na_1():return list(map(lambda x:int(x)*(-1), stdin.readline().split()))
def na_2():return list(map(lambda x:int(x)-1, stdin.readline().split()))
rnage=range
rnge=range
rage = range


t = ni()
for i in range(t):
	N,X = nm()
	k = N*(N+1)//2
	if k > X:
		print(-1)
	else:
		ans = []
		tot = 0
		for i in range(1,N):
			ans.append(i)
			tot += i
		ans.append(X-tot)
		print(*ans)
0