結果
| 問題 | No.3126 Dual Query Problem |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-04-25 22:23:18 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 199 ms / 2,000 ms |
| + 417µs | |
| コード長 | 436 bytes |
| 記録 | |
| コンパイル時間 | 259 ms |
| コンパイル使用メモリ | 96,104 KB |
| 実行使用メモリ | 134,116 KB |
| 最終ジャッジ日時 | 2026-07-12 11:19:07 |
| 合計ジャッジ時間 | 12,595 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 33 |
ソースコード
import sys,collections
input = sys.stdin.readline
n,q = map(int,input().split())
x = [int(input()) for i in range(n)]
ans = []
c = collections.defaultdict(lambda :-1)
idx = 1
for i in x:
if c[i] == -1:
c[i] = idx
ans.append([1,idx,i])
idx+=1
ans.append([2,c[i]])
if len(ans) > q:
exit(print('No'))
while len(ans) < q:
ans.append([1,1000000000,1000000000])
print('Yes')
for i in ans:
print(*i)