結果
| 問題 | No.2965 Don't Stop the Game again |
| コンテスト | |
| ユーザー |
Kude
|
| 提出日時 | 2024-11-16 16:43:19 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 24 ms / 2,024 ms |
| + 925µs | |
| コード長 | 669 bytes |
| 記録 | |
| コンパイル時間 | 66 ms |
| コンパイル使用メモリ | 82,880 KB |
| 実行使用メモリ | 56,872 KB |
| 最終ジャッジ日時 | 2026-09-24 20:28:59 |
| 合計ジャッジ時間 | 4,868 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 40 |
ソースコード
m = int(input())
q = list(map(int, input().split()))
asks = []
for j in range(1, 51):
asks.append((1, j))
one = q.index(1)
for x in range(1, 41):
ids = []
for i in range(50):
if i != one and q[i] == x:
ids.append(i)
if len(ids) >= 2:
i1, i2 = ids[:2]
for k in range(m.bit_length() - 1)[::-1]:
asks.append((4, i1+1, i1+1, i1+1))
if m >> k & 1:
asks.append((4, i1+1, i2+1, i1+1))
for i in range(50):
if i != one and i != i1:
asks.append((3, i1+1, i1+1, i+1))
break
else:
assert False
print(len(asks))
for x in asks:
print(*x)
Kude