結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 13 ms
18,832 KB
testcase_01 AC 13 ms
18,780 KB
testcase_02 AC 12 ms
18,936 KB
testcase_03 AC 12 ms
18,784 KB
testcase_04 WA -
testcase_05 AC 13 ms
18,880 KB
testcase_06 AC 13 ms
18,848 KB
testcase_07 AC 13 ms
18,864 KB
testcase_08 AC 12 ms
18,844 KB
testcase_09 AC 14 ms
18,868 KB
testcase_10 AC 14 ms
18,956 KB
testcase_11 AC 13 ms
18,984 KB
testcase_12 AC 13 ms
18,896 KB
testcase_13 AC 14 ms
18,908 KB
testcase_14 AC 14 ms
18,912 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"."\n";
}else{
    echo "NO"."\n";
}

?>
0