結果

問題 No.69 文字を自由に並び替え
ユーザー Kentaro YanoKentaro Yano
提出日時 2021-03-29 18:57:21
言語 PHP
(8.3.4)
結果
WA  
実行時間 -
コード長 451 bytes
コンパイル時間 2,233 ms
コンパイル使用メモリ 30,428 KB
実行使用メモリ 31,276 KB
最終ジャッジ日時 2024-05-07 00:16:59
合計ジャッジ時間 3,085 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
30,796 KB
testcase_01 AC 41 ms
30,748 KB
testcase_02 AC 40 ms
30,932 KB
testcase_03 AC 40 ms
31,016 KB
testcase_04 WA -
testcase_05 AC 39 ms
30,904 KB
testcase_06 AC 40 ms
30,924 KB
testcase_07 AC 39 ms
30,936 KB
testcase_08 AC 41 ms
30,952 KB
testcase_09 AC 41 ms
31,092 KB
testcase_10 AC 40 ms
30,936 KB
testcase_11 AC 40 ms
30,860 KB
testcase_12 AC 40 ms
30,960 KB
testcase_13 AC 40 ms
31,096 KB
testcase_14 AC 40 ms
31,276 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
while($line = fgets(STDIN)){
    $tmp[] = trim($line);
}

foreach($tmp as $val){
    $arr[] = explode(" ", $val);
}

$stringA = str_split($arr[0][0]);
$stringB = str_split($arr[1][0]);

$stringCount = count($stringA);

$bool = false;
for($i=0; $i<$stringCount; $i++){
    if(!in_array($stringA[$i], $stringB)){
        $bool = false;
        break;
    }else{
        $bool = true;
    }
}

if($bool){
    echo "YES";
}else{
    echo "NO";
}

?>
0