結果
問題 | No.69 文字を自由に並び替え |
ユーザー |
![]() |
提出日時 | 2021-03-29 18:57:21 |
言語 | PHP (843.2) |
結果 |
WA
|
実行時間 | - |
コード長 | 451 bytes |
コンパイル時間 | 2,746 ms |
コンパイル使用メモリ | 30,508 KB |
実行使用メモリ | 31,200 KB |
最終ジャッジ日時 | 2024-11-29 11:28:20 |
合計ジャッジ時間 | 4,060 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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";}else{echo "NO";}?>