結果
| 問題 | No.2567 A_1 > A_2 > ... > A_N | 
| コンテスト | |
| ユーザー |  sasa8uyauya | 
| 提出日時 | 2024-09-06 19:01:00 | 
| 言語 | PyPy3 (7.3.15) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 1,307 ms / 2,000 ms | 
| コード長 | 317 bytes | 
| コンパイル時間 | 386 ms | 
| コンパイル使用メモリ | 82,096 KB | 
| 実行使用メモリ | 84,488 KB | 
| 最終ジャッジ日時 | 2024-09-06 19:01:10 | 
| 合計ジャッジ時間 | 9,539 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 1 | 
| other | AC * 16 | 
ソースコード
T=int(input()) for _ in range(T): n,x=map(int,input().split()) if n*(n+1)//2>x: print(-1) continue ok=10**20 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)
