結果

問題 No.69 文字を自由に並び替え
ユーザー Kentaro YanoKentaro Yano
提出日時 2021-03-29 18:57:21
言語 PHP
(8.3.4)
結果
WA  
実行時間 -
コード長 451 bytes
コンパイル時間 1,239 ms
コンパイル使用メモリ 18,544 KB
実行使用メモリ 19,004 KB
最終ジャッジ日時 2023-08-19 17:16:56
合計ジャッジ時間 2,391 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
18,860 KB
testcase_01 AC 16 ms
18,716 KB
testcase_02 AC 15 ms
18,788 KB
testcase_03 AC 16 ms
18,908 KB
testcase_04 WA -
testcase_05 AC 16 ms
18,876 KB
testcase_06 AC 16 ms
19,004 KB
testcase_07 AC 16 ms
18,960 KB
testcase_08 AC 16 ms
18,852 KB
testcase_09 AC 16 ms
18,912 KB
testcase_10 AC 16 ms
18,908 KB
testcase_11 AC 15 ms
18,788 KB
testcase_12 AC 16 ms
18,980 KB
testcase_13 AC 16 ms
18,916 KB
testcase_14 AC 15 ms
18,908 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