結果

問題 No.1150 シュークリームゲーム(Easy)
ユーザー tailstails
提出日時 2020-08-07 22:03:02
言語 Perl
(5.38.2)
結果
WA  
実行時間 -
コード長 288 bytes
コンパイル時間 1,084 ms
コンパイル使用メモリ 6,160 KB
実行使用メモリ 30,812 KB
最終ジャッジ日時 2023-10-25 01:06:56
合計ジャッジ時間 8,929 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 8 ms
6,140 KB
testcase_01 AC 8 ms
6,140 KB
testcase_02 WA -
testcase_03 AC 8 ms
6,136 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 7 ms
6,140 KB
testcase_07 AC 7 ms
6,136 KB
testcase_08 AC 7 ms
6,144 KB
testcase_09 AC 8 ms
6,140 KB
testcase_10 AC 8 ms
6,136 KB
testcase_11 WA -
testcase_12 AC 7 ms
6,136 KB
testcase_13 AC 7 ms
6,140 KB
testcase_14 AC 7 ms
6,144 KB
testcase_15 AC 8 ms
6,140 KB
testcase_16 AC 8 ms
6,144 KB
testcase_17 AC 8 ms
6,140 KB
testcase_18 WA -
testcase_19 AC 7 ms
6,144 KB
testcase_20 AC 8 ms
6,140 KB
testcase_21 AC 8 ms
6,140 KB
testcase_22 AC 239 ms
26,388 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 244 ms
26,148 KB
testcase_26 AC 276 ms
28,504 KB
testcase_27 AC 280 ms
29,020 KB
testcase_28 WA -
testcase_29 AC 250 ms
25,832 KB
testcase_30 AC 304 ms
27,568 KB
testcase_31 WA -
testcase_32 WA -
testcase_33 AC 287 ms
27,636 KB
testcase_34 AC 300 ms
28,536 KB
testcase_35 AC 312 ms
29,048 KB
testcase_36 AC 361 ms
29,472 KB
testcase_37 AC 333 ms
29,676 KB
testcase_38 AC 284 ms
25,804 KB
testcase_39 WA -
testcase_40 WA -
testcase_41 AC 337 ms
29,172 KB
testcase_42 AC 178 ms
30,812 KB
testcase_43 AC 178 ms
30,812 KB
testcase_44 AC 180 ms
29,668 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

sub f{
	my($i,$j,$s)=@_;
	$s+=$a[$_%$n]for$i..$j-1;
	$s
}

$n=<>;
($s,$t)=glob<>;
--$s;--$t;$g=1;
($s,$t,$g)=($t,$s,-1)if$s>$t;
@a=glob<>;

$z=f($a=$s+$t+$n+2>>1,$b=$s+$t+$n*2+1>>1)- f($c=$s+$t+2>>1,$d=$s+$t+$n+1>>1);
$z*=$g;
$z+=abs(($a==$d?0:$a[$d])-($c==$b-$n?0:$a[$b-$n]));
print $z;
0