結果
| 問題 |
No.2567 A_1 > A_2 > ... > A_N
|
| コンテスト | |
| ユーザー |
NATTO
|
| 提出日時 | 2023-12-02 16:41:26 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 2,425 bytes |
| コンパイル時間 | 4,775 ms |
| コンパイル使用メモリ | 307,308 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-09-26 20:37:12 |
| 合計ジャッジ時間 | 6,783 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 1 WA * 15 |
ソースコード
#pragma region header
#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
// clang-format off
struct Fast {Fast() {std::cin.tie(0); ios::sync_with_stdio(false);}} fast;
inline void IN(void)
{
return;
}
template <typename First, typename... Rest>
void IN(First &first, Rest &...rest)
{
cin >> first;
IN(rest...);
return;
}
template <typename T>
istream &operator>>(istream &is, pair<T, T> &p)
{
is >> p.first >> p.second;
return is;
}
template <typename T>
istream &operator>>(istream &is, vector<T> &v)
{
for (auto &x : v)
is >> x;
return is;
}
template <typename T>
ostream &operator<<(ostream &os, vector<T> &v)
{
for (auto &x : v)
os << x << " ";
os << endl;
return os;
}
// templetes
//alias
using ull = unsigned long long;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vll = vector<ll>;
using vvll = vector<vll>;
using vb = vector<bool>;
using vvb = vector<vb>;
using vs = vector<string>;
using pll = pair<ll, ll>;
//define short
#define vec vector
#define all(obs) (obs).begin(), (obs).end()
#define YESNO(cond) (cond) ? cout << "YES" << endl : cout << "NO" << endl;
#define YesNo(cond) (cond) ? cout << "Yes" << endl : cout << "No" << endl;
#define yesno(cond) (cond) ? cout << "yes" << endl : cout << "no" << endl;
#define sortv(obs) sort(all(obs))
#define rsortv(obs) reverse(sort(all(obs)))
#define bitu(n,i) (((n)>>(i))&1)
#define dig10(n) to_string(n).size()
#define bcnt(n) __builtin_popcount(n)
#define bcntll(n) __builtin_popcountll(n)
#define F first
#define S second
#define pb push_back
#define pq priority_queue
//define loop
#define rep(i, a,b) for(ll i = a; i < (b); i++)
#define rrep(i, a,b) for(ll i = a; i >= (b); i--)
//define INF
const ll INF = 1e18;
template <typename T1,typename T2>
inline void chmin(T1 &a,T2 b){
if(a>b) a = b;
}
template <typename T1,typename T2>
inline void chmax(T1 &a,T2 b){
if(a<b) a = b;
}
#pragma endregion header
// clang-format on
int main(){
ll T;
cin>>T;
rep(i,0,T){
ll n,x;
cin>>n>>x;
if((n+1)*n/2<=x){
ll dif=x-(n+1)*n/2;
ll q=dif/n,r=dif%n;
rep(j,0,n){
if(j<n-r) cout<<n-j+q<<" ";
else cout<<n-j+1+q<<" ";
}
cout<<endl;
}else{
cout<<-1<<endl;
}
}
}
NATTO