結果
| 問題 |
No.1285 ゴミ捨て
|
| コンテスト | |
| ユーザー |
lam6er
|
| 提出日時 | 2025-04-15 23:37:04 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 323 bytes |
| コンパイル時間 | 172 ms |
| コンパイル使用メモリ | 82,640 KB |
| 実行使用メモリ | 79,040 KB |
| 最終ジャッジ日時 | 2025-04-15 23:37:59 |
| 合計ジャッジ時間 | 3,084 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 10 WA * 12 |
ソースコード
import bisect
n = int(input())
a = sorted([int(input()) for _ in range(n)])
ans = 0
i = 0
while i < n:
ans += 1
current = a[i]
while True:
next_pos = bisect.bisect_right(a, current + 1)
if next_pos >= n:
break
current = a[next_pos]
i = next_pos
i += 1
print(ans)
lam6er