結果
| 問題 | No.3126 Dual Query Problem |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-04-25 21:35:56 |
| 言語 | PyPy3 (8.0.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 203 ms / 2,000 ms |
| + 507µs | |
| コード長 | 425 bytes |
| 記録 | |
| コンパイル時間 | 119 ms |
| コンパイル使用メモリ | 64,180 KB |
| 実行使用メモリ | 93,848 KB |
| 最終ジャッジ日時 | 2026-11-11 05:08:57 |
| 合計ジャッジ時間 | 12,728 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge5_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 34 |
ソースコード
from collections import defaultdict
n,q=map(int,input().split())
ans=[]
idx=1
pl=defaultdict(lambda:0)
for i in range(n):
x=int(input())
if pl[x]!=0:
ans.append((2,pl[x]))
continue
pl[x]=idx
ans.append((1,idx,x))
ans.append((2,idx))
idx+=1
for _ in range(q-len(ans)):
ans.append((1,1,1))
if len(ans)>q:
print("No")
else:
print("Yes")
for row in ans:
print(*row)