結果

問題 No.837 Noelちゃんと星々2
ユーザー tailstails
提出日時 2019-09-25 15:23:09
言語 Perl
(5.38.2)
結果
AC  
実行時間 497 ms / 2,000 ms
コード長 207 bytes
コンパイル時間 343 ms
コンパイル使用メモリ 5,300 KB
実行使用メモリ 35,900 KB
最終ジャッジ日時 2023-09-02 07:28:55
合計ジャッジ時間 6,533 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 364 ms
35,780 KB
testcase_01 AC 452 ms
35,696 KB
testcase_02 AC 460 ms
35,772 KB
testcase_03 AC 468 ms
35,764 KB
testcase_04 AC 478 ms
35,900 KB
testcase_05 AC 471 ms
35,760 KB
testcase_06 AC 497 ms
35,760 KB
testcase_07 AC 475 ms
35,756 KB
testcase_08 AC 483 ms
35,776 KB
testcase_09 AC 6 ms
5,208 KB
testcase_10 AC 6 ms
5,204 KB
testcase_11 AC 6 ms
5,196 KB
testcase_12 AC 7 ms
5,136 KB
testcase_13 AC 6 ms
5,160 KB
testcase_14 AC 6 ms
5,012 KB
testcase_15 AC 6 ms
5,080 KB
testcase_16 AC 6 ms
5,108 KB
testcase_17 AC 6 ms
5,164 KB
testcase_18 AC 7 ms
5,108 KB
testcase_19 AC 6 ms
5,232 KB
testcase_20 AC 6 ms
5,116 KB
testcase_21 AC 6 ms
5,016 KB
testcase_22 AC 7 ms
5,076 KB
testcase_23 AC 6 ms
5,132 KB
testcase_24 AC 6 ms
5,016 KB
testcase_25 AC 6 ms
5,140 KB
testcase_26 AC 6 ms
5,196 KB
testcase_27 AC 7 ms
5,116 KB
testcase_28 AC 6 ms
5,164 KB
testcase_29 AC 6 ms
5,080 KB
testcase_30 AC 5 ms
5,188 KB
testcase_31 AC 6 ms
5,132 KB
testcase_32 AC 6 ms
5,028 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Possible precedence problem on bitwise | operator at Main.pl line 10.
Main.pl syntax OK

ソースコード

diff #

$N=<>;
@s=(0,map$s+=$_,@Y=sort{$a-$b}glob<>);
$%=1e18;
for$i(0..$N){
	$j= 0+$i>>1;
	$k=$i+$N>>1;
	$t=$s[0]-$s[$j]-$s[$i-$j]+$s[$i]+$s[$i]-$s[$k]-$s[$i+$N-$k]+$s[$N];
	$%=$t if$t<$%
}
print$Y[0]==$Y[-1]|$%,$/
0