結果
問題 |
No.2560 A_1 < A_2 < ... < A_N
|
ユーザー |
|
提出日時 | 2025-03-20 01:06:38 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 25 ms / 2,000 ms |
コード長 | 573 bytes |
コンパイル時間 | 3,340 ms |
コンパイル使用メモリ | 272,672 KB |
実行使用メモリ | 7,324 KB |
最終ジャッジ日時 | 2025-03-20 01:06:45 |
合計ジャッジ時間 | 5,727 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 15 |
ソースコード
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, s, e) for (int i = (int)(s); i < (int)(e); ++i) #define all(a) (a).begin(),(a).end() int main() { cin.tie(nullptr); ios_base::sync_with_stdio(false); int T; cin >> T; rep(testcase, 0, T) { ll N, X; cin >> N >> X; ll t = N*(N + 1) / 2; if (X < t) { cout << -1 << '\n'; continue; } rep(i, 0, N - 1) cout << i + 1 << ' '; cout << X - N*(N - 1) / 2 << '\n'; } }