結果
問題 | No.2560 A_1 < A_2 < ... < A_N |
ユーザー |
|
提出日時 | 2023-12-02 14:38:01 |
言語 | C++17(gcc12) (gcc 12.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 121 ms / 2,000 ms |
コード長 | 1,267 bytes |
コンパイル時間 | 23,222 ms |
コンパイル使用メモリ | 351,640 KB |
最終ジャッジ日時 | 2025-02-18 03:42:41 |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 15 |
ソースコード
#ifdef SENJAN#include <ku/debug.hpp>#else#pragma GCC target("avx2")#pragma GCC optimize("O3")#pragma GCC optimize("unroll-loops")#define debug(...)#endif#include <bits/stdc++.h>#include <atcoder/all>using namespace std;using namespace atcoder;using ll=long long;using ull=unsigned long long;using ld=long double;using graph=vector<vector<int>>;template<class T> using wgraph=vector<vector<pair<int,T>>>;template<class T> using min_priority_queue=priority_queue<T,vector<T>,greater<T>>;constexpr int INF32=INT_MAX/2;constexpr ll INF64=1LL<<60;constexpr ld PI=3.14159265358979323846;constexpr int dx[]={0,0,-1,1,-1,-1,1,1},dy[]={-1,1,0,0,-1,1,-1,1};#define rep(i,s,n) for(ll i=(ll)(s);i<(ll)(n);i++)#define rrep(i,s,n) for(ll i=(ll)(s);i>=(ll)(n);i--)template<class T> inline bool chmax(T &a,T b){return a<b?a=b,true:false;}template<class T> inline bool chmin(T &a,T b){return a>b?a=b,true:false;}void _main();int main(){cin.tie(0)->sync_with_stdio(0);cout<<fixed<<setprecision(16);_main();}void solve(){ll N; cin >> N;ll X; cin >> X;if(N*(N+1)/2<=X){for(int i=0; i<N-1; i++){cout << (i+1) << ' ';}cout << (X-N*(N-1)/2) << endl;}else{cout << -1 << endl;}}void _main(){int T; cin >> T;while(T--) solve();}