結果

問題 No.904 サメトロ
ユーザー tailstails
提出日時 2019-10-11 22:15:41
言語 Perl
(5.38.0)
結果
AC  
実行時間 7 ms / 1,000 ms
コード長 241 bytes
コンパイル時間 518 ms
コンパイル使用メモリ 5,372 KB
実行使用メモリ 5,364 KB
最終ジャッジ日時 2023-08-16 18:22:14
合計ジャッジ時間 2,639 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 6 ms
5,328 KB
testcase_01 AC 6 ms
5,092 KB
testcase_02 AC 6 ms
5,220 KB
testcase_03 AC 6 ms
5,316 KB
testcase_04 AC 6 ms
5,164 KB
testcase_05 AC 6 ms
5,228 KB
testcase_06 AC 6 ms
5,212 KB
testcase_07 AC 6 ms
5,260 KB
testcase_08 AC 6 ms
5,264 KB
testcase_09 AC 6 ms
5,216 KB
testcase_10 AC 7 ms
5,164 KB
testcase_11 AC 7 ms
5,108 KB
testcase_12 AC 6 ms
5,220 KB
testcase_13 AC 6 ms
5,304 KB
testcase_14 AC 6 ms
5,164 KB
testcase_15 AC 7 ms
5,252 KB
testcase_16 AC 6 ms
5,108 KB
testcase_17 AC 6 ms
5,324 KB
testcase_18 AC 6 ms
5,216 KB
testcase_19 AC 6 ms
5,096 KB
testcase_20 AC 6 ms
5,100 KB
testcase_21 AC 6 ms
5,216 KB
testcase_22 AC 6 ms
5,256 KB
testcase_23 AC 6 ms
5,164 KB
testcase_24 AC 6 ms
5,084 KB
testcase_25 AC 6 ms
5,364 KB
testcase_26 AC 6 ms
5,352 KB
testcase_27 AC 6 ms
5,160 KB
testcase_28 AC 6 ms
5,220 KB
testcase_29 AC 6 ms
5,088 KB
testcase_30 AC 6 ms
5,088 KB
testcase_31 AC 6 ms
5,164 KB
testcase_32 AC 6 ms
5,160 KB
testcase_33 AC 6 ms
5,160 KB
testcase_34 AC 6 ms
5,212 KB
testcase_35 AC 6 ms
5,112 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Name "main::n" used only once: possible typo at Main.pl line 1.
Main.pl syntax OK

ソースコード

diff #

$n=<>;
@ab=<>;
for(@ab){
	($a,$b)=glob;
	$sa+=$a;
	$sb+=$b;
}
for(@ab){
	($a,$b)=glob;
	$x=$a+$b-$sb; $x=0 if $x<0; $mina=$x if $mina<$x;
	$x=$a+$b-$sa; $x=0 if $x<0; $minb=$x if $minb<$x;
}
$sa-=$mina-1;
$sb-=$minb-1;
print $sa<$sb?$sa:$sb;
0