結果
| 問題 | No.2560 A_1 < A_2 < ... < A_N | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2023-12-02 14:59:14 | 
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 136 ms / 2,000 ms | 
| コード長 | 549 bytes | 
| コンパイル時間 | 1,949 ms | 
| コンパイル使用メモリ | 191,024 KB | 
| 最終ジャッジ日時 | 2025-02-18 04:08:09 | 
| ジャッジサーバーID (参考情報) | judge3 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 1 | 
| other | AC * 15 | 
ソースコード
#include <bits/stdc++.h>
//#include<atcoder/all>
using namespace std;
//using namespace atcoder;
using ll = long long;
const ll mod = 1000000007;
//const ll mod = 998244353;
ll t, n[100009];
ll x[100009];
int main() {
	cin >> t;
	for (int i = 1; i <= t; i++)cin >> n[i] >> x[i];
	for (int i = 1; i <= t; i++) {
		if ((n[i] * (n[i] + 1)) / 2 > x[i]) {
			cout << "-1" << endl;
			continue;
		}
		ll res = x[i] - (n[i] * (n[i] + 1)) / 2;
		for (int j = 1; j <= n[i]; j++) {
			if (j == n[i])cout << j + res << endl;
			else cout << j << " ";
		}
	}
}
            
            
            
        