結果

問題 No.3126 Dual Query Problem
ユーザー moon17
提出日時 2025-04-25 21:45:51
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 281 ms / 2,000 ms
コード長 269 bytes
コンパイル時間 464 ms
コンパイル使用メモリ 81,708 KB
実行使用メモリ 125,532 KB
最終ジャッジ日時 2025-06-20 02:43:14
合計ジャッジ時間 13,960 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 33
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import*
n,q,*x=map(int,open(0).read().split())
s={*x}
if len(s)+n>q:
  exit(print('No'))
print('Yes')
p=1
idx={}
for i in s:
  idx[i]=p
  p+=1
for i in s:
  print(1,idx[i],i)
  q-=1
for i in x:
  print(2,idx[i])
  q-=1
for _ in range(q):
  print(1,1,1)
0