結果
問題 |
No.1285 ゴミ捨て
|
ユーザー |
![]() |
提出日時 | 2022-01-13 07:18:39 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 401 bytes |
コンパイル時間 | 657 ms |
コンパイル使用メモリ | 82,060 KB |
実行使用メモリ | 311,808 KB |
最終ジャッジ日時 | 2024-11-16 08:55:58 |
合計ジャッジ時間 | 51,257 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 2 |
other | WA * 5 OLE * 17 |
ソースコード
n=int(input()) ns=[int(input()) for i in range(n)] ns.sort(reverse=True) lis=[0]*n cnt=0 def cal(x): lis[x]=1 now = ns[x] for i in range(n): if lis[i] == 1: continue if now > ns[i]+1: now = ns[i] lis[i] = 1 for i in range(n): print(lis) if lis[i] == 0: cal(i) cnt+=1 print(cnt)