結果
| 問題 | No.2560 A_1 < A_2 < ... < A_N |
| コンテスト | |
| ユーザー |
Today03
|
| 提出日時 | 2023-12-02 19:42:24 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 82 ms / 2,000 ms |
| コード長 | 552 bytes |
| 記録 | |
| コンパイル時間 | 1,354 ms |
| コンパイル使用メモリ | 211,968 KB |
| 実行使用メモリ | 6,528 KB |
| 最終ジャッジ日時 | 2026-07-03 04:02:37 |
| 合計ジャッジ時間 | 3,069 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 15 |
ソースコード
#include <bits/stdc++.h>
#if __has_include("./debug.cpp")
#include "./debug.cpp"
#else
#define debug(...)
#define print_line
#endif
using namespace std;
using ll = long long;
void solve() {
int N;
ll X;
cin >> N >> X;
if (X < 1ll * N * (N + 1) / 2) {
cout << "-1\n";
return;
}
vector<ll> ans;
for (int i = 0; i < N - 1; i++) ans.push_back(i + 1);
ans.push_back(X - 1ll * (N - 1) * N / 2);
for (int i = 0; i < N; i++) cout << ans[i] << ' ';
cout << '\n';
}
int main() {
int T;
cin >> T;
for (int i = 0; i < T; i++) {
solve();
}
}
Today03