結果

問題 No.365 ジェンガソート
ユーザー papinianuspapinianus
提出日時 2016-09-01 13:56:57
言語 PHP
(8.3.4)
結果
WA  
実行時間 -
コード長 356 bytes
コンパイル時間 162 ms
コンパイル使用メモリ 32,148 KB
実行使用メモリ 42,808 KB
最終ジャッジ日時 2024-04-27 14:10:16
合計ジャッジ時間 4,607 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
32,340 KB
testcase_01 AC 35 ms
32,404 KB
testcase_02 AC 38 ms
32,272 KB
testcase_03 AC 35 ms
32,400 KB
testcase_04 AC 34 ms
32,148 KB
testcase_05 AC 40 ms
32,276 KB
testcase_06 AC 36 ms
32,528 KB
testcase_07 AC 35 ms
32,400 KB
testcase_08 AC 38 ms
32,276 KB
testcase_09 AC 34 ms
32,268 KB
testcase_10 AC 35 ms
32,400 KB
testcase_11 AC 35 ms
32,212 KB
testcase_12 AC 35 ms
32,400 KB
testcase_13 AC 35 ms
32,400 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 105 ms
40,380 KB
testcase_23 AC 75 ms
36,408 KB
testcase_24 AC 105 ms
40,508 KB
testcase_25 AC 55 ms
34,360 KB
testcase_26 AC 84 ms
36,152 KB
testcase_27 WA -
testcase_28 AC 88 ms
36,664 KB
testcase_29 WA -
testcase_30 AC 90 ms
36,536 KB
testcase_31 AC 59 ms
34,104 KB
testcase_32 AC 59 ms
34,364 KB
testcase_33 AC 130 ms
42,424 KB
testcase_34 AC 48 ms
34,616 KB
testcase_35 WA -
testcase_36 WA -
testcase_37 AC 134 ms
42,480 KB
testcase_38 AC 134 ms
42,612 KB
testcase_39 WA -
testcase_40 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?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;
0