結果
| 問題 | No.3477 Yet Another LIS Triangle |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-03-20 23:18:44 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 699 bytes |
| 記録 | |
| コンパイル時間 | 1,930 ms |
| コンパイル使用メモリ | 340,560 KB |
| 実行使用メモリ | 7,720 KB |
| 最終ジャッジ日時 | 2026-03-20 23:18:49 |
| 合計ジャッジ時間 | 3,866 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 3 WA * 19 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll=long long;
int main(){
int ttt;
cin>>ttt;
while(ttt--){
ll n,k;
cin>>n>>k;
if(n==k||k==1){
cout<<"No"<<endl;
continue;
}
cout<<"Yes"<<endl;
vector<ll> a(n-1),b(n-1),c(n-2);
iota(a.begin(),a.end(),2);
iota(b.begin(),b.end(),n+1);
iota(c.begin(),c.end(),2*n);
k-=2;
ranges::reverse(a.begin()+k,a.end());
ranges::reverse(b.begin()+k,b.end());
ranges::reverse(c.begin()+k+1,c.end());
cout<<1;
for(int i=0;i<n-1;i++)cout<<" "<<a[i];
cout<<endl;
cout<<a[n-2];
for(int i=0;i<n-1;i++)cout<<" "<<b[i];
cout<<endl;
cout<<b[n-2];
for(int i=0;i<n-2;i++)cout<<" "<<c[i];
cout<<" "<<1<<endl;
}
}