結果
| 問題 |
No.3126 Dual Query Problem
|
| コンテスト | |
| ユーザー |
timi
|
| 提出日時 | 2025-04-25 21:31:40 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 492 bytes |
| コンパイル時間 | 448 ms |
| コンパイル使用メモリ | 82,456 KB |
| 実行使用メモリ | 101,168 KB |
| 最終ジャッジ日時 | 2025-04-25 21:32:03 |
| 合計ジャッジ時間 | 8,827 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 WA * 12 |
ソースコード
N,Q=map(int, input().split())
A=[];B=[]
for i in range(N):
s=int(input())
B.append(s)
if len(A)==0 or A[-1]!=s:
A.append(s)
if len(A)+N>Q:
print('No')
exit()
print('Yes')
ans=[]
for i in range(len(B)):
if i==0:
ans.append((1,1,B[i]))
ans.append((2,1))
else:
if B[i-1]==B[i]:
ans.append((2,1))
else:
ans.append((1,1,B[i]))
ans.append((2,1))
c=Q-len(ans)
for i in range(c):
ans.append((1,1,1))
for a in ans:
print(*a)
timi