結果
問題 |
No.2560 A_1 < A_2 < ... < A_N
|
ユーザー |
|
提出日時 | 2023-12-07 18:42:56 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 131 ms / 2,000 ms |
コード長 | 376 bytes |
コンパイル時間 | 1,419 ms |
コンパイル使用メモリ | 166,104 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-27 02:16:10 |
合計ジャッジ時間 | 3,177 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 15 |
ソースコード
#include <bits/stdc++.h> using namespace std; using ll = long long; int main(){ ll t; cin >> t; while (t--) { ll n, x; cin >> n >> x; if (n * (n + 1) / 2 <= x) { for (ll i = 1; i < n; i++) cout << i << " "; cout << n + x - n * (n + 1) / 2 << endl; } else cout << -1 << endl; } return 0; }