結果

問題 No.2560 A_1 < A_2 < ... < A_N
ユーザー 👑 KA37RIKA37RI
提出日時 2023-12-02 14:46:49
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 572 ms / 2,000 ms
コード長 261 bytes
コンパイル時間 264 ms
コンパイル使用メモリ 11,904 KB
実行使用メモリ 15,656 KB
最終ジャッジ日時 2023-12-02 14:47:00
合計ジャッジ時間 5,096 ms
ジャッジサーバーID
(参考情報)
judge13 / judge9
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 26 ms
9,984 KB
testcase_01 AC 100 ms
13,780 KB
testcase_02 AC 113 ms
14,312 KB
testcase_03 AC 102 ms
15,656 KB
testcase_04 AC 112 ms
15,188 KB
testcase_05 AC 117 ms
15,164 KB
testcase_06 AC 538 ms
9,984 KB
testcase_07 AC 548 ms
9,984 KB
testcase_08 AC 572 ms
9,984 KB
testcase_09 AC 546 ms
9,984 KB
testcase_10 AC 534 ms
9,984 KB
testcase_11 AC 28 ms
9,984 KB
testcase_12 AC 27 ms
10,112 KB
testcase_13 AC 27 ms
10,112 KB
testcase_14 AC 28 ms
9,984 KB
testcase_15 AC 33 ms
10,240 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def solve(n, x):
	head_sum = (n - 1) * n // 2
	last = x - head_sum
	if last < n:
		return [-1]
	else:
		ans = list(range(1, n + 1))
		ans[-1] = last
		return ans

t = int(input())
for _ in range(t):
	n, t = [int(x) for x in input().split()]
	print(*solve(n, t))
0