結果
| 問題 | No.3477 Yet Another LIS Triangle |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-03-21 18:32:09 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 978 bytes |
| 記録 | |
| コンパイル時間 | 2,439 ms |
| コンパイル使用メモリ | 334,084 KB |
| 実行使用メモリ | 7,848 KB |
| 最終ジャッジ日時 | 2026-03-21 18:32:17 |
| 合計ジャッジ時間 | 4,387 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 3 WA * 19 |
ソースコード
#include <bits/stdc++.h>
#define int long long
#define endl "\n"
using namespace std;
bool solve()
{
int n,k;
cin>>n>>k;
int t = 3*n-3;
if (k==1 || k==n) return false;
k--;
cout << "Yes" << endl;
int num = 0;
for (int i = 1; i <= k; i++)
{
num++;
cout << num << " ";
}
int i = (t+3)/3;
for (; i > num; i--)
{
cout << i << " ";
}
cout << endl;
// -----------
cout << i+1 << " ";
num = (t+3)/3;
for (int i = 1; i <= k-1; i++)
{
num++;
cout << num << " ";
}
i = t-(n-2);
for (; i > num; i--)
{
cout << i << " ";
}
cout << endl;
// ----------------
cout << i+1 << " ";
num = 2*(t+3)/3;
for (int i = 1; i <= k-2; i++)
{
cout << num << " ";
}
i = t;
for (; i >= num; i--)
{
cout << i << " ";
}
cout << 1 << endl;
// ---------
return true;
}
signed main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
int t;cin>>t;while(t--)
if (!solve())cout << "No" <<endl;
}