結果
| 問題 | No.365 ジェンガソート | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2016-09-01 13:56:57 | 
| 言語 | PHP (843.2) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 356 bytes | 
| コンパイル時間 | 101 ms | 
| コンパイル使用メモリ | 32,272 KB | 
| 実行使用メモリ | 42,612 KB | 
| 最終ジャッジ日時 | 2024-11-15 16:41:24 | 
| 合計ジャッジ時間 | 4,685 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 27 WA * 14 | 
コンパイルメッセージ
No syntax errors detected in Main.php
ソースコード
<?php
$n = trim(fgets(STDIN));
$nums = explode(" ",trim(fgets(STDIN)));
$numstr = implode("", $nums);
sort($nums);
$act = 0;
$tail = strlen($numstr);
while(($num = array_pop($nums)) !== null) {
    $pos = strpos($numstr, $num);
    if($pos > $tail) {
        array_push($nums,$num);
        break;
    }
    $tail = $pos;
}
echo count($nums);
echo PHP_EOL;
            
            
            
        