結果
| 問題 | No.2560 A_1 < A_2 < ... < A_N | 
| コンテスト | |
| ユーザー |  shisidor | 
| 提出日時 | 2023-12-02 15:33:39 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 133 ms / 2,000 ms | 
| コード長 | 426 bytes | 
| コンパイル時間 | 880 ms | 
| コンパイル使用メモリ | 72,996 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-09-26 18:53:52 | 
| 合計ジャッジ時間 | 2,720 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 1 | 
| other | AC * 15 | 
ソースコード
#include<iostream>
#include<vector>
#include<algorithm>
#include<cmath>
using namespace std;
int main() {
    int t;
    cin >> t;
    for (int i = 0; i < t; i++) {
        long long n, x;
        cin >> n >> x;
        long long d = x - n * (n + 1) / 2;
        if (d >= 0) {
            for (int j = 1; j <= n - 1; j++) cout << j << " ";
            cout << n + d << endl;
        }
        else cout << -1 << endl;
    }
}
            
            
            
        