結果
| 問題 | No.1285 ゴミ捨て |
| コンテスト | |
| ユーザー |
lam6er
|
| 提出日時 | 2025-03-31 17:24:55 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 275 bytes |
| 記録 | |
| コンパイル時間 | 226 ms |
| コンパイル使用メモリ | 95,984 KB |
| 実行使用メモリ | 86,124 KB |
| 最終ジャッジ日時 | 2026-07-08 04:09:21 |
| 合計ジャッジ時間 | 4,315 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 12 WA * 10 |
ソースコード
n = int(input())
a = [int(input()) for _ in range(n)]
a.sort()
if n == 0:
print(0)
exit()
count = 1
current_max = a[0]
for i in range(1, n):
if a[i] > current_max + 1:
current_max = a[i]
else:
count += 1
current_max = a[i]
print(count)
lam6er