結果
問題 |
No.2567 A_1 > A_2 > ... > A_N
|
ユーザー |
![]() |
提出日時 | 2024-09-06 19:00:02 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 317 bytes |
コンパイル時間 | 560 ms |
コンパイル使用メモリ | 82,896 KB |
実行使用メモリ | 84,856 KB |
最終ジャッジ日時 | 2024-09-06 19:00:07 |
合計ジャッジ時間 | 4,615 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 11 WA * 5 |
ソースコード
T=int(input()) for _ in range(T): n,x=map(int,input().split()) if n*(n+1)//2>x: print(-1) continue ok=10**10 ng=n-1 while ok-ng>1: m=(ok+ng)//2 if n*(m+m-n+1)//2>=x: ok=m else: ng=m a=list(range(ok-n+1,ok+1))[::-1] for i in range(n*(ok+ok-n+1)//2-x): a[~i]-=1 print(*a if 0 not in a else -1)