結果

問題 No.1868 Teleporting Cyanmond
ユーザー tailstails
提出日時 2022-03-11 21:25:40
言語 Perl
(5.38.2)
結果
AC  
実行時間 224 ms / 2,000 ms
コード長 152 bytes
コンパイル時間 471 ms
コンパイル使用メモリ 5,344 KB
実行使用メモリ 31,484 KB
最終ジャッジ日時 2023-10-14 06:09:11
合計ジャッジ時間 5,397 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 6 ms
5,136 KB
testcase_01 AC 6 ms
5,096 KB
testcase_02 AC 6 ms
5,068 KB
testcase_03 AC 202 ms
27,412 KB
testcase_04 AC 151 ms
21,864 KB
testcase_05 AC 14 ms
6,184 KB
testcase_06 AC 39 ms
8,776 KB
testcase_07 AC 92 ms
15,912 KB
testcase_08 AC 56 ms
11,736 KB
testcase_09 AC 82 ms
14,824 KB
testcase_10 AC 163 ms
25,548 KB
testcase_11 AC 9 ms
5,564 KB
testcase_12 AC 46 ms
10,372 KB
testcase_13 AC 97 ms
16,856 KB
testcase_14 AC 200 ms
29,348 KB
testcase_15 AC 129 ms
20,952 KB
testcase_16 AC 26 ms
7,776 KB
testcase_17 AC 44 ms
9,996 KB
testcase_18 AC 221 ms
31,468 KB
testcase_19 AC 216 ms
31,456 KB
testcase_20 AC 217 ms
31,484 KB
testcase_21 AC 213 ms
31,412 KB
testcase_22 AC 213 ms
31,384 KB
testcase_23 AC 220 ms
31,404 KB
testcase_24 AC 224 ms
31,376 KB
testcase_25 AC 223 ms
31,480 KB
testcase_26 AC 220 ms
31,440 KB
testcase_27 AC 221 ms
31,408 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

$n=<>;
@r=(0,glob<>);
$a=1;
for$i(1..$n){
	if($r[$i]==$n){
		print $c+1;
		exit;
	}
	if($b<$r[$i]){
		$b=$r[$i];
	}
	if($i==$a){
		$a=$b;
		$c+=1;
	}
}
0