結果
| 問題 | No.3477 Yet Another LIS Triangle |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-10-08 22:32:58 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 132 ms / 2,000 ms |
| + 999µs | |
| コード長 | 373 bytes |
| 記録 | |
| コンパイル時間 | 61 ms |
| コンパイル使用メモリ | 81,540 KB |
| 実行使用メモリ | 100,468 KB |
| 最終ジャッジ日時 | 2026-10-08 22:33:12 |
| 合計ジャッジ時間 | 4,906 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 22 |
ソースコード
for _ in range(int(input())):
N, K = map(int, input().split())
if K == 1 or K == N:
print("No")
continue
V = [0]
for i in range(N - 2, K - 1, -1):
V.append(i)
for i in range(1, K):
V.append(i)
P = []
for k in range(3):
P += [x * 3 + k + 1 for x in V]
P.append(P[0])
print("Yes")
print(*P[:N])
print(*P[N - 1 : N * 2 - 1])
print(*P[N * 2 - 2:])