結果
| 問題 |
No.1454 ツブ消ししとるなEasy
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-08-03 04:32:37 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 702 bytes |
| コンパイル時間 | 2,766 ms |
| コンパイル使用メモリ | 215,252 KB |
| 最終ジャッジ日時 | 2025-01-23 13:51:29 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 2 |
| other | AC * 7 WA * 9 |
ソースコード
#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef unsigned long long ull;
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
ll myRand(ll B) {
return (ull)rng() % B;
}
int main(){
cin.tie(nullptr);
ios::sync_with_stdio(false);
int n,m,x,y; cin >> n >> m >> x >> y;
vector<int> a(n);
int cnt=0;
for(int i=0;i<n;i++){
cin >> a[i];
if(a[i]>=x)cnt++;
}
sort(a.begin(), a.end());
if(cnt>m){
printf("Handicapped\n");
}
else{
ll res=0;
for(int i=0;i<m;i++){
if(a[i]>y)res+=a[i];
}
printf("%lld\n",res);
}
}