結果
| 問題 |
No.2560 A_1 < A_2 < ... < A_N
|
| コンテスト | |
| ユーザー |
tnakao0123
|
| 提出日時 | 2023-12-03 18:02:22 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 571 bytes |
| コンパイル時間 | 264 ms |
| コンパイル使用メモリ | 40,900 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-09-26 22:12:35 |
| 合計ジャッジ時間 | 1,479 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 10 WA * 5 |
ソースコード
/* -*- coding: utf-8 -*-
*
* 2560.cc: No.2560 A_1 < A_2 < ... < A_N - yukicoder
*/
#include<cstdio>
#include<algorithm>
using namespace std;
/* constant */
const int MAX_N = 200000;
/* typedef */
typedef long long ll;
/* global variables */
/* subroutines */
/* main */
int main() {
int tn;
scanf("%d", &tn);
while (tn--) {
int n, x;
scanf("%d%d", &n, &x);
ll s = (ll)n * (n + 1) / 2;
if (s > x) { puts("-1"); continue; }
for (int i = 1; i < n; i++) printf("%d ", i);
printf("%d\n", x - n * (n - 1) / 2);
}
return 0;
}
tnakao0123