結果
問題 |
No.3126 Dual Query Problem
|
ユーザー |
![]() |
提出日時 | 2025-04-25 21:28:48 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 270 ms / 2,000 ms |
コード長 | 259 bytes |
コンパイル時間 | 445 ms |
コンパイル使用メモリ | 82,296 KB |
実行使用メモリ | 103,692 KB |
最終ジャッジ日時 | 2025-06-20 02:38:39 |
合計ジャッジ時間 | 13,264 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 33 |
ソースコード
n,Q=map(int,input().split()) q=[] d={} l=1 for _ in range(n): x=int(input()) if x not in d: d[x]=l q+=[(1,d[x],x)] l+=1 q+=[(2,d[x])] if len(q)>Q: print("No") exit() q=[(1,1,1)]*(Q-len(q))+q print("Yes") for i in range(Q): print(*q[i])