結果
問題 | No.69 文字を自由に並び替え |
ユーザー |
![]() |
提出日時 | 2021-03-29 18:59:01 |
言語 | PHP (843.2) |
結果 |
WA
|
実行時間 | - |
コード長 | 461 bytes |
コンパイル時間 | 1,451 ms |
コンパイル使用メモリ | 32,144 KB |
実行使用メモリ | 32,020 KB |
最終ジャッジ日時 | 2024-11-29 11:31:19 |
合計ジャッジ時間 | 2,625 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 14 WA * 1 |
コンパイルメッセージ
No syntax errors detected in Main.php
ソースコード
<?phpwhile($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";}?>