結果

問題 No.451 575
ユーザー tailstails
提出日時 2016-12-02 01:30:35
言語 Perl
(5.38.2)
結果
AC  
実行時間 167 ms / 2,000 ms
コード長 246 bytes
コンパイル時間 159 ms
コンパイル使用メモリ 6,688 KB
実行使用メモリ 35,072 KB
最終ジャッジ日時 2024-05-09 18:57:25
合計ジャッジ時間 3,884 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 4 ms
5,248 KB
testcase_01 AC 3 ms
5,376 KB
testcase_02 AC 4 ms
5,376 KB
testcase_03 AC 3 ms
5,376 KB
testcase_04 AC 3 ms
5,376 KB
testcase_05 AC 11 ms
6,400 KB
testcase_06 AC 29 ms
9,472 KB
testcase_07 AC 167 ms
31,104 KB
testcase_08 AC 3 ms
5,376 KB
testcase_09 AC 4 ms
5,504 KB
testcase_10 AC 41 ms
12,544 KB
testcase_11 AC 120 ms
27,904 KB
testcase_12 AC 150 ms
34,944 KB
testcase_13 AC 162 ms
35,012 KB
testcase_14 AC 3 ms
5,376 KB
testcase_15 AC 8 ms
6,272 KB
testcase_16 AC 24 ms
8,832 KB
testcase_17 AC 131 ms
27,264 KB
testcase_18 AC 133 ms
27,264 KB
testcase_19 AC 87 ms
19,584 KB
testcase_20 AC 9 ms
6,272 KB
testcase_21 AC 4 ms
5,760 KB
testcase_22 AC 3 ms
5,376 KB
testcase_23 AC 153 ms
35,072 KB
testcase_24 AC 95 ms
22,656 KB
testcase_25 AC 3 ms
5,376 KB
testcase_26 AC 3 ms
5,376 KB
testcase_27 AC 3 ms
5,504 KB
testcase_28 AC 5 ms
5,632 KB
testcase_29 AC 17 ms
7,424 KB
testcase_30 AC 133 ms
27,264 KB
testcase_31 AC 3 ms
5,376 KB
testcase_32 AC 55 ms
13,952 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

$e=1e18|1;
($n,@b)=<>;
@a=1;
$\--;
for(0,1){
	$m=$o=$a[0];
	for(0..$#b){
		$v=$a[$_+1]=($b[$_]-$a[$_])*(-1)**$_;
		$v=$e-$v if $_%4==1||$_%4==2;
		$m=$v if $m>$v;
		$o=$v if $o<$v;
	}
	$a[0]=2-$m,next if $m<1;
	$\=join$/,$n+1,@a if $o<$e;
}
print
0