結果
| 問題 | 
                            No.1454 ツブ消ししとるなEasy
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2022-12-29 17:20:05 | 
| 言語 | PHP  (843.2)  | 
                    
| 結果 | 
                             
                                RE
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 413 bytes | 
| コンパイル時間 | 88 ms | 
| コンパイル使用メモリ | 30,900 KB | 
| 実行使用メモリ | 32,080 KB | 
| 最終ジャッジ日時 | 2024-11-24 18:30:53 | 
| 合計ジャッジ時間 | 1,840 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | RE * 4 | 
| other | RE * 16 | 
コンパイルメッセージ
No syntax errors detected in Main.php
ソースコード
<?php
[$n,$m,$x,$y] = explode(" ",trim(fgets(STDIN)));
$a = trim(fgets(STDIN));
sort($a);
$count = 0;
$ans = 0;
for ($i = 0; $i < $n-$m; $i++) {
     if ($a[$i] <= $x) {
         $count++;
     }elseif ($a[$i] > $x) {
         break;
     }
}
for ($j = $n-$m; $j < $n; $j++) {
     if ($a[$j] > $y) {
         $ans += $a[$j];
     }
}
if ($count == $n-$m) {
    echo $ans;
}else {
    echo "Handicapped";
}
?>