結果

問題 No.349 干支の置き物
ユーザー papinianuspapinianus
提出日時 2016-07-27 17:17:19
言語 PHP
(8.3.4)
結果
WA  
実行時間 -
コード長 285 bytes
コンパイル時間 100 ms
コンパイル使用メモリ 30,876 KB
実行使用メモリ 31,108 KB
最終ジャッジ日時 2024-04-24 10:22:59
合計ジャッジ時間 2,067 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
30,648 KB
testcase_01 AC 36 ms
30,696 KB
testcase_02 AC 34 ms
30,912 KB
testcase_03 AC 35 ms
30,916 KB
testcase_04 AC 35 ms
30,840 KB
testcase_05 AC 34 ms
31,084 KB
testcase_06 AC 34 ms
30,944 KB
testcase_07 AC 37 ms
30,712 KB
testcase_08 AC 34 ms
30,808 KB
testcase_09 AC 35 ms
30,752 KB
testcase_10 AC 35 ms
30,656 KB
testcase_11 AC 35 ms
30,816 KB
testcase_12 AC 37 ms
30,920 KB
testcase_13 AC 34 ms
30,892 KB
testcase_14 AC 33 ms
30,800 KB
testcase_15 AC 34 ms
30,892 KB
testcase_16 AC 34 ms
30,760 KB
testcase_17 AC 35 ms
30,800 KB
testcase_18 WA -
testcase_19 AC 34 ms
30,844 KB
testcase_20 WA -
testcase_21 AC 35 ms
30,856 KB
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 35 ms
30,972 KB
testcase_26 AC 34 ms
30,812 KB
testcase_27 AC 33 ms
30,872 KB
testcase_28 AC 34 ms
30,896 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 34 ms
30,876 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
$n = trim(fgets(STDIN));
$statue = [];
for($i=0;$i<$n;$i++) {
    $eto = trim(fgets(STDIN));
    if(isset($statue[$eto])) {
        $statue[$eto]++;
    } else {
        $statue[$eto] = 1;
    }
}
if(max($statue) < $n /2) {
    echo "YES";
} else {
    echo "NO";
}
echo PHP_EOL;
0