結果
| 問題 | No.2567 A_1 > A_2 > ... > A_N | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2023-12-02 17:35:23 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 146 ms / 2,000 ms | 
| コード長 | 732 bytes | 
| コンパイル時間 | 1,993 ms | 
| コンパイル使用メモリ | 175,652 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-09-26 21:16:13 | 
| 合計ジャッジ時間 | 4,336 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 1 | 
| other | AC * 16 | 
ソースコード
//#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
#include <atcoder/modint>
#include <atcoder/dsu>
#include <boost/rational.hpp>
using namespace std;
using namespace atcoder;
using ll = long long;
using mint = modint998244353;
const double pi = 3.14159265359879323846264338327950288419;
const ll INF = 9 * 1e18;
using p = pair<ll, ll>;
int main() {
  ll t; cin >> t;
  for(ll i = 0; i < t; i++){
    ll n, x; cin >> n >> x;
    vector<ll> ans(n);
    for(ll j = 0; j < n; j++){
      ans[j] = n - j;
      x -= n - j;
    }
    if(x < 0) cout << -1 << endl;
    else{
      ll tmp = x / n;
      for(ll j = 0; j < n; j++){
        if(j < x % n) ans[j]++;
        cout << ans[j] + tmp << " ";
      }
      cout << endl;
    }
  }
}
            
            
            
        