結果

問題 No.2567 A_1 > A_2 > ... > A_N
ユーザー RYOH2718RYOH2718
提出日時 2023-12-02 16:58:33
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 636 bytes
コンパイル時間 175 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 88,172 KB
最終ジャッジ日時 2023-12-02 16:58:42
合計ジャッジ時間 2,286 ms
ジャッジサーバーID
(参考情報)
judge9 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
53,460 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 38 ms
53,460 KB
testcase_15 WA -
testcase_16 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

def INT():
    return int(input())


def MI():
    return map(int, input().split())


def LI():
    return list(map(int, input().split()))


def INT():
    return int(input())


def MI():
    return map(int, input().split())


def LI():
    return list(map(int, input().split()))


T = INT()
for _ in range(T):
    N, X = MI()
    if N * (N + 1) // 2 > X:
        print(-1)
        continue

    A = []
    for i in range(N, 1, -1):
        A.append(i)
        X -= i

    A.append(X)

    A.sort(reverse=True)
    if A[0] == A[1] and N > 1:
        A[0] += 1
        A[-1] -= 1
    print(*A)
0