結果
| 問題 | No.2560 A_1 < A_2 < ... < A_N |
| コンテスト | |
| ユーザー |
Pres1dent
|
| 提出日時 | 2023-12-02 14:41:31 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 76 ms / 2,000 ms |
| コード長 | 419 bytes |
| 記録 | |
| コンパイル時間 | 613 ms |
| コンパイル使用メモリ | 109,384 KB |
| 実行使用メモリ | 9,972 KB |
| 最終ジャッジ日時 | 2026-07-03 03:02:13 |
| 合計ジャッジ時間 | 2,188 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 15 |
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <set>
#include <map>
using namespace std;
void solve() {
long long n, x; cin >> n >> x;
long long s = (n + 1) * n / 2;
if (s > x) cout << -1 << endl;
else {
for (int i = 0; i < n - 1; i++) {
cout << i + 1 << " ";
}
cout << x - s + n << endl;
}
}
int main() {
int t; cin >> t;
while (t--) solve();
}
Pres1dent