結果

問題 No.3126 Dual Query Problem
ユーザー timi
提出日時 2025-04-25 21:35:21
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 431 bytes
コンパイル時間 427 ms
コンパイル使用メモリ 82,588 KB
実行使用メモリ 134,884 KB
最終ジャッジ日時 2025-04-25 21:36:06
合計ジャッジ時間 11,965 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 2
other AC * 18 WA * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

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))
  
for a in ans:
  print(*a)
      
    
0