結果

問題 No.69 文字を自由に並び替え
ユーザー
提出日時 2016-01-08 21:46:01
言語 PHP
(8.3.4)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 417 bytes
コンパイル時間 912 ms
コンパイル使用メモリ 18,160 KB
実行使用メモリ 18,636 KB
最終ジャッジ日時 2023-08-20 23:13:21
合計ジャッジ時間 1,218 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
18,516 KB
testcase_01 AC 15 ms
18,556 KB
testcase_02 AC 16 ms
18,624 KB
testcase_03 AC 16 ms
18,624 KB
testcase_04 AC 15 ms
18,516 KB
testcase_05 AC 15 ms
18,488 KB
testcase_06 AC 16 ms
18,484 KB
testcase_07 AC 16 ms
18,596 KB
testcase_08 AC 15 ms
18,596 KB
testcase_09 AC 14 ms
18,636 KB
testcase_10 WA -
testcase_11 AC 15 ms
18,516 KB
testcase_12 AC 15 ms
18,596 KB
testcase_13 AC 15 ms
18,476 KB
testcase_14 AC 15 ms
18,552 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php

fscanf(STDIN , "%s", $line_1);
fscanf(STDIN , "%s", $line_2);

$line1 = str_split($line_1);
$line2 = str_split($line_2);

$line_all = array_merge($line1, $line2);

$count = array_count_values($line_all);

asort($count);

$ok = true;

foreach($count as $key => $value){
    if($value == 1 or $value %2 == 1){
        $ok = false;
        break;
    }
}

if($ok === true){
    echo "YES";
}else{
    echo "NO";
}
0