結果

問題 No.349 干支の置き物
ユーザー 重荷重荷
提出日時 2016-03-18 08:47:12
言語 PHP
(8.3.4)
結果
AC  
実行時間 38 ms / 2,000 ms
コード長 271 bytes
コンパイル時間 2,984 ms
コンパイル使用メモリ 32,148 KB
実行使用メモリ 31,536 KB
最終ジャッジ日時 2024-04-28 14:44:02
合計ジャッジ時間 4,923 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
31,536 KB
testcase_01 AC 34 ms
31,432 KB
testcase_02 AC 33 ms
31,220 KB
testcase_03 AC 32 ms
31,276 KB
testcase_04 AC 33 ms
31,148 KB
testcase_05 AC 33 ms
31,156 KB
testcase_06 AC 34 ms
31,156 KB
testcase_07 AC 33 ms
31,232 KB
testcase_08 AC 33 ms
30,972 KB
testcase_09 AC 34 ms
31,008 KB
testcase_10 AC 34 ms
31,156 KB
testcase_11 AC 33 ms
31,120 KB
testcase_12 AC 35 ms
31,024 KB
testcase_13 AC 34 ms
30,988 KB
testcase_14 AC 32 ms
31,164 KB
testcase_15 AC 34 ms
31,176 KB
testcase_16 AC 35 ms
31,172 KB
testcase_17 AC 35 ms
31,028 KB
testcase_18 AC 34 ms
31,172 KB
testcase_19 AC 36 ms
30,956 KB
testcase_20 AC 35 ms
31,172 KB
testcase_21 AC 36 ms
30,816 KB
testcase_22 AC 36 ms
31,048 KB
testcase_23 AC 37 ms
31,252 KB
testcase_24 AC 37 ms
31,132 KB
testcase_25 AC 38 ms
30,976 KB
testcase_26 AC 37 ms
31,388 KB
testcase_27 AC 36 ms
31,360 KB
testcase_28 AC 35 ms
31,220 KB
testcase_29 AC 35 ms
31,172 KB
testcase_30 AC 35 ms
31,240 KB
testcase_31 AC 34 ms
31,216 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php

$num = trim(fgets(STDIN));
$array = array();
for($i=0;$i<$num;$i++){
    array_push($array, trim(fgets(STDIN)));
}
$aCnt = max(array_count_values($array));
$safeNum = ceil($num / 2);
if($num > 1 && $aCnt <= $safeNum){
    printf("YES");
}else {
    printf("NO");
}
0