結果

問題 No.1285 ゴミ捨て
ユーザー matriematrie
提出日時 2020-12-11 09:33:49
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 311 ms / 2,000 ms
コード長 179 bytes
コンパイル時間 1,076 ms
コンパイル使用メモリ 10,644 KB
実行使用メモリ 13,288 KB
最終ジャッジ日時 2023-08-19 07:28:07
合計ジャッジ時間 5,347 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,852 KB
testcase_01 AC 15 ms
7,848 KB
testcase_02 AC 15 ms
7,912 KB
testcase_03 AC 15 ms
7,840 KB
testcase_04 AC 16 ms
7,848 KB
testcase_05 AC 15 ms
7,936 KB
testcase_06 AC 16 ms
7,856 KB
testcase_07 AC 297 ms
12,980 KB
testcase_08 AC 25 ms
8,416 KB
testcase_09 AC 135 ms
10,304 KB
testcase_10 AC 259 ms
12,352 KB
testcase_11 AC 239 ms
12,048 KB
testcase_12 AC 179 ms
10,960 KB
testcase_13 AC 178 ms
11,024 KB
testcase_14 AC 278 ms
12,844 KB
testcase_15 AC 204 ms
11,372 KB
testcase_16 AC 66 ms
9,032 KB
testcase_17 AC 67 ms
9,016 KB
testcase_18 AC 63 ms
9,020 KB
testcase_19 AC 123 ms
10,192 KB
testcase_20 AC 61 ms
8,816 KB
testcase_21 AC 81 ms
9,176 KB
testcase_22 AC 308 ms
13,172 KB
testcase_23 AC 311 ms
13,288 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
l=[int(input()) for _ in range(n)]
s=[0]
for x in sorted(l):
	for i in range(len(s)):
		if x>s[i]+1: s[i]=x; break
	if x not in s: s+=[x]
	s=sorted(s)
print(len(s))
0