結果

問題 No.69 文字を自由に並び替え
ユーザー mondomondo
提出日時 2019-07-25 21:57:25
言語 PHP
(8.3.4)
結果
WA  
実行時間 -
コード長 335 bytes
コンパイル時間 91 ms
コンパイル使用メモリ 12,060 KB
実行使用メモリ 12,332 KB
最終ジャッジ日時 2023-09-15 00:07:12
合計ジャッジ時間 939 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 6 ms
12,208 KB
testcase_01 AC 6 ms
12,168 KB
testcase_02 AC 6 ms
12,180 KB
testcase_03 AC 7 ms
12,256 KB
testcase_04 WA -
testcase_05 AC 7 ms
12,312 KB
testcase_06 AC 6 ms
12,240 KB
testcase_07 AC 6 ms
12,296 KB
testcase_08 AC 7 ms
12,232 KB
testcase_09 WA -
testcase_10 AC 7 ms
12,332 KB
testcase_11 AC 7 ms
12,272 KB
testcase_12 AC 7 ms
12,304 KB
testcase_13 AC 7 ms
12,288 KB
testcase_14 AC 6 ms
12,240 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
while($line = fgets(STDIN)){
    $array[] = trim($line);
}
$a = str_split($array[0]);
$b = str_split($array[1]);
asort($a);
asort($b);
$ans = NULL;
foreach ($a as $i) {
    foreach ($b as $j) {
        if ($i ===$j){
            $ans = "YES\n";            
        } else {
            $ans = "NO\n";
        }
    }
}
echo $ans;
0