結果
問題 | No.1454 ツブ消ししとるなEasy |
ユーザー |
![]() |
提出日時 | 2021-04-13 16:45:21 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 67 ms / 2,000 ms |
コード長 | 306 bytes |
コンパイル時間 | 170 ms |
コンパイル使用メモリ | 81,792 KB |
実行使用メモリ | 87,936 KB |
最終ジャッジ日時 | 2024-06-29 21:47:52 |
合計ジャッジ時間 | 2,108 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 16 |
ソースコード
n,m,x,y=map(int,input().split())a=list(map(int,input().split()))L=[]L2=[]for i in range(n):if a[i]>=x:L.append(a[i])elif a[i]>y:L2.append(a[i])if len(L)>m:print('Handicapped')exit()L2.sort()L2.reverse()for i in range(min(m-len(L),len(L2))):L.append(L2[i])print(sum(L))