結果

問題 No.2560 A_1 < A_2 < ... < A_N
ユーザー DeltaStruct
提出日時 2023-11-04 09:00:29
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 265 bytes
コンパイル時間 3,637 ms
コンパイル使用メモリ 243,368 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-09-26 05:46:40
合計ジャッジ時間 5,308 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 10 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main(){
  int q,n; long long x; cin >> q;
  while(q--){
    cin >> n >> x;
    if (n*(n+1)/2>x){ cout << -1 << endl; continue; }
    for (int i(1);i < n;++i) cout << i << ' ';
    cout << x-n*(n-1)/2 << endl;
  }
}
0