結果
問題 |
No.1285 ゴミ捨て
|
ユーザー |
![]() |
提出日時 | 2025-04-15 23:36:08 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 323 bytes |
コンパイル時間 | 242 ms |
コンパイル使用メモリ | 82,240 KB |
実行使用メモリ | 78,780 KB |
最終ジャッジ日時 | 2025-04-15 23:36:53 |
合計ジャッジ時間 | 3,130 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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)