結果
問題 |
No.3126 Dual Query Problem
|
ユーザー |
![]() |
提出日時 | 2025-04-25 21:46:31 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 316 ms / 2,000 ms |
コード長 | 444 bytes |
コンパイル時間 | 360 ms |
コンパイル使用メモリ | 82,048 KB |
実行使用メモリ | 134,564 KB |
最終ジャッジ日時 | 2025-06-20 02:43:30 |
合計ジャッジ時間 | 14,559 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 33 |
ソースコード
N,Q=map(int, input().split()) A=[];B=[] for i in range(N): s=int(input()) B.append(s) A.append(s) A=list(set(A)) a=len(A) if len(A)+N>Q: print('No') exit() D={} ans=[] for i in range(len(B)): b=B[i]+31 if b not in D: D[b]=1 ans.append((1,b-31,b-31)) ans.append((2,b-31)) else: ans.append((2,b-31)) c=Q-len(ans) for i in range(c): ans.append((1,1,1)) print('Yes') for a in ans: print(*a)