結果

問題 No.69 文字を自由に並び替え
ユーザー
提出日時 2016-01-08 21:14:39
言語 PHP
(8.3.4)
結果
WA  
実行時間 -
コード長 513 bytes
コンパイル時間 369 ms
コンパイル使用メモリ 18,648 KB
実行使用メモリ 19,088 KB
最終ジャッジ日時 2023-09-09 20:42:42
合計ジャッジ時間 1,303 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
18,796 KB
testcase_01 AC 16 ms
18,912 KB
testcase_02 AC 16 ms
18,824 KB
testcase_03 AC 16 ms
18,976 KB
testcase_04 WA -
testcase_05 AC 16 ms
18,864 KB
testcase_06 AC 16 ms
18,952 KB
testcase_07 AC 16 ms
18,800 KB
testcase_08 AC 16 ms
18,948 KB
testcase_09 AC 16 ms
18,916 KB
testcase_10 WA -
testcase_11 AC 16 ms
18,972 KB
testcase_12 AC 16 ms
18,796 KB
testcase_13 WA -
testcase_14 AC 16 ms
18,940 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);

$count_key = count($count);

$Ok = true;

foreach($count as $key => $value){
    for($i = 0; $i <= $key; $i ++){
        if($value == 1){
           $Ok = false;
           break;
        }else{
            $Ok = true;
        }
    }
}

if($Ok === false){
    echo "NO\n";
}else{
    echo "YES\n";
}
0