結果
| 問題 | No.3847 Triple Balls Removal |
| コンテスト | |
| ユーザー |
Kude
|
| 提出日時 | 2026-12-04 21:21:40 |
| 言語 | PyPy3 (8.0.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 184 ms / 2,000 ms |
| + 344µs | |
| コード長 | 199 bytes |
| 記録 | |
| コンパイル時間 | 90 ms |
| コンパイル使用メモリ | 64,440 KB |
| 実行使用メモリ | 151,676 KB |
| 最終ジャッジ日時 | 2026-12-04 21:22:06 |
| 合計ジャッジ時間 | 7,212 ms |
|
ジャッジサーバーID (参考情報) |
judge6_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 30 |
ソースコード
input()
ans = 0
st = []
for x in map(int, input().split()):
if len(st) >= 2 and st[-1] == st[-2] == x:
ans += 3
st.pop()
st.pop()
else:
st.append(x)
print(ans)
Kude