結果
| 問題 | No.3126 Dual Query Problem |
| コンテスト | |
| ユーザー |
三価スニウム
|
| 提出日時 | 2025-04-25 21:44:50 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 202 ms / 2,000 ms |
| + 145µs | |
| コード長 | 522 bytes |
| 記録 | |
| コンパイル時間 | 231 ms |
| コンパイル使用メモリ | 96,628 KB |
| 実行使用メモリ | 123,596 KB |
| 最終ジャッジ日時 | 2026-07-12 11:11:54 |
| 合計ジャッジ時間 | 12,360 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 33 |
ソースコード
N, Q = map(int, input().split(' '))
X = [int(input()) for _ in range(N)]
def dual_query():
a = set()
query = []
c = 0
for i in X:
if i in a:
query.append((2, i))
c += 1
else:
query.append((1, i, i))
query.append((2, i))
a.add(i)
c += 2
if c > Q:
return print('No')
while c < Q:
query.append((1, 1, 1))
c += 1
print('Yes')
for q in query:
print(*q)
dual_query()
三価スニウム