結果

問題 No.2567 A_1 > A_2 > ... > A_N
ユーザー nikoro256nikoro256
提出日時 2023-12-09 13:01:55
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 372 ms / 2,000 ms
コード長 251 bytes
コンパイル時間 189 ms
コンパイル使用メモリ 81,572 KB
実行使用メモリ 83,936 KB
最終ジャッジ日時 2023-12-09 13:02:00
合計ジャッジ時間 4,857 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
53,460 KB
testcase_01 AC 83 ms
80,908 KB
testcase_02 AC 85 ms
83,236 KB
testcase_03 AC 80 ms
81,924 KB
testcase_04 AC 86 ms
83,072 KB
testcase_05 AC 88 ms
83,936 KB
testcase_06 AC 319 ms
77,144 KB
testcase_07 AC 372 ms
77,484 KB
testcase_08 AC 304 ms
77,148 KB
testcase_09 AC 338 ms
77,784 KB
testcase_10 AC 367 ms
77,324 KB
testcase_11 AC 40 ms
53,460 KB
testcase_12 AC 46 ms
62,340 KB
testcase_13 AC 37 ms
53,460 KB
testcase_14 AC 35 ms
53,460 KB
testcase_15 AC 46 ms
62,216 KB
testcase_16 AC 38 ms
53,460 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

T=int(input())
for _ in range(T):
    N,X=map(int,input().split())
    if (N+1)*N//2>X:
        print(-1)
        continue
    d=(N+1)*N//2
    ans=[i+(X-d)//N for i in range(1,N+1)][::-1]
    for i in range((X-d)%N):
        ans[i]+=1
    print(*ans)
0