結果

問題 No.2567 A_1 > A_2 > ... > A_N
ユーザー yaakiyu
提出日時 2023-12-02 16:06:02
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 384 bytes
コンパイル時間 207 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 84,224 KB
最終ジャッジ日時 2024-09-26 19:49:50
合計ジャッジ時間 3,106 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 1
other AC * 1 WA * 15
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = lambda: sys.stdin.readline()[:-1]
sys.setrecursionlimit(1000000)

t = int(input())

for i in range(t):
    n, x = map(int, input().split())
    p = x - (n+1)*n//2
    if p < 0:
        print(-1)
    else:
        taseru = p//n
        amari = p%n
        print(p, taseru, amari)
        print(*[i+taseru+(1 if amari >= (n-i+1) else 0) for i in range(1, n+1)][::-1])
0