結果
| 問題 | No.1285 ゴミ捨て |
| コンテスト | |
| ユーザー |
trineutron
|
| 提出日時 | 2020-11-21 18:57:42 |
| 言語 | Python3 (3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 181 ms / 2,000 ms |
| + 623µs | |
| コード長 | 187 bytes |
| 記録 | |
| コンパイル時間 | 62 ms |
| コンパイル使用メモリ | 14,976 KB |
| 実行使用メモリ | 16,128 KB |
| 最終ジャッジ日時 | 2026-10-01 14:46:09 |
| 合計ジャッジ時間 | 3,862 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 22 |
ソースコード
n = int(input())
a = sorted([int(input()) for i in range(n)])
idx = 0
ans = 0
for i in range(n):
while a[i] >= a[idx] + 2:
idx += 1
ans = max(ans, i - idx + 1)
print(ans)
trineutron