結果
| 問題 | No.3126 Dual Query Problem |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-04-25 22:23:18 |
| 言語 | PyPy3 (8.0.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 169 ms / 2,000 ms |
| + 563µs | |
| コード長 | 436 bytes |
| 記録 | |
| コンパイル時間 | 81 ms |
| コンパイル使用メモリ | 64,536 KB |
| 実行使用メモリ | 92,564 KB |
| 最終ジャッジ日時 | 2026-11-11 05:23:16 |
| 合計ジャッジ時間 | 11,423 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge5_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 34 |
ソースコード
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)