結果

問題 No.365 ジェンガソート
ユーザー papinianuspapinianus
提出日時 2016-09-01 14:31:17
言語 PHP
(8.3.4)
結果
AC  
実行時間 50 ms / 2,000 ms
コード長 242 bytes
コンパイル時間 77 ms
コンパイル使用メモリ 32,400 KB
実行使用メモリ 44,728 KB
最終ジャッジ日時 2024-04-27 14:11:36
合計ジャッジ時間 3,041 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
32,088 KB
testcase_01 AC 40 ms
32,340 KB
testcase_02 AC 39 ms
32,404 KB
testcase_03 AC 39 ms
32,404 KB
testcase_04 AC 40 ms
32,276 KB
testcase_05 AC 40 ms
32,400 KB
testcase_06 AC 40 ms
32,404 KB
testcase_07 AC 40 ms
32,528 KB
testcase_08 AC 39 ms
32,528 KB
testcase_09 AC 40 ms
32,656 KB
testcase_10 AC 39 ms
32,396 KB
testcase_11 AC 40 ms
32,272 KB
testcase_12 AC 41 ms
32,528 KB
testcase_13 AC 39 ms
32,400 KB
testcase_14 AC 39 ms
32,532 KB
testcase_15 AC 39 ms
32,400 KB
testcase_16 AC 46 ms
42,424 KB
testcase_17 AC 48 ms
44,472 KB
testcase_18 AC 40 ms
34,232 KB
testcase_19 AC 48 ms
44,600 KB
testcase_20 AC 41 ms
34,616 KB
testcase_21 AC 44 ms
34,492 KB
testcase_22 AC 47 ms
42,424 KB
testcase_23 AC 45 ms
38,328 KB
testcase_24 AC 46 ms
42,424 KB
testcase_25 AC 41 ms
34,360 KB
testcase_26 AC 42 ms
38,460 KB
testcase_27 AC 49 ms
44,604 KB
testcase_28 AC 43 ms
38,588 KB
testcase_29 AC 47 ms
44,728 KB
testcase_30 AC 43 ms
38,584 KB
testcase_31 AC 44 ms
34,492 KB
testcase_32 AC 44 ms
34,360 KB
testcase_33 AC 49 ms
44,472 KB
testcase_34 AC 41 ms
34,488 KB
testcase_35 AC 44 ms
42,552 KB
testcase_36 AC 46 ms
40,504 KB
testcase_37 AC 47 ms
44,472 KB
testcase_38 AC 48 ms
44,600 KB
testcase_39 AC 48 ms
44,604 KB
testcase_40 AC 50 ms
44,476 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
$n = trim(fgets(STDIN));
$nums = explode(" ", trim(fgets(STDIN)));
$nums = array_flip($nums);
$tail = $n;
for($n;$n > 0;$n--) {
    $pos = $nums[$n];
    if($pos > $tail) {
        break;
    }
    $tail = $pos;
}
echo $n;
echo PHP_EOL;
0