結果
問題 | No.1285 ゴミ捨て |
ユーザー | lllllll88938494 |
提出日時 | 2022-01-13 07:18:39 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 401 bytes |
コンパイル時間 | 142 ms |
コンパイル使用メモリ | 82,416 KB |
実行使用メモリ | 240,136 KB |
最終ジャッジ日時 | 2024-04-28 01:01:20 |
合計ジャッジ時間 | 5,151 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | WA | - |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | OLE | - |
testcase_08 | -- | - |
testcase_09 | -- | - |
testcase_10 | -- | - |
testcase_11 | -- | - |
testcase_12 | -- | - |
testcase_13 | -- | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
testcase_21 | -- | - |
testcase_22 | -- | - |
testcase_23 | -- | - |
ソースコード
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)