結果
問題 | No.2560 A_1 < A_2 < ... < A_N |
ユーザー |
|
提出日時 | 2023-12-02 15:57:57 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 145 ms / 2,000 ms |
コード長 | 662 bytes |
コンパイル時間 | 2,266 ms |
コンパイル使用メモリ | 175,956 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-26 19:35:47 |
合計ジャッジ時間 | 4,523 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 15 |
ソースコード
//#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() { int t; cin >> t; for(int i = 0; i < t; i++){ ll n, x; cin >> n >> x; vector<ll> ans(n); for(int j = 0; j < n; j++){ ans[j] = j+1; x -= j+1; } if(x < 0) cout << -1 << endl; else{ ans[n-1] += x; for(auto v : ans) cout << v << " "; cout << endl; } } }