結果

問題 No.545 ママの大事な二人の子供
ユーザー tailstails
提出日時 2017-07-15 00:47:18
言語 Perl
(5.38.0)
結果
AC  
実行時間 111 ms / 2,000 ms
コード長 183 bytes
コンパイル時間 201 ms
コンパイル使用メモリ 5,452 KB
実行使用メモリ 12,372 KB
最終ジャッジ日時 2023-07-29 15:07:33
合計ジャッジ時間 2,690 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 7 ms
5,196 KB
testcase_01 AC 6 ms
5,140 KB
testcase_02 AC 6 ms
5,244 KB
testcase_03 AC 6 ms
5,304 KB
testcase_04 AC 7 ms
5,312 KB
testcase_05 AC 6 ms
5,176 KB
testcase_06 AC 5 ms
5,072 KB
testcase_07 AC 6 ms
5,072 KB
testcase_08 AC 6 ms
5,204 KB
testcase_09 AC 6 ms
5,152 KB
testcase_10 AC 6 ms
5,160 KB
testcase_11 AC 7 ms
5,160 KB
testcase_12 AC 6 ms
5,132 KB
testcase_13 AC 5 ms
5,060 KB
testcase_14 AC 5 ms
5,252 KB
testcase_15 AC 5 ms
5,072 KB
testcase_16 AC 5 ms
5,316 KB
testcase_17 AC 6 ms
5,160 KB
testcase_18 AC 8 ms
5,456 KB
testcase_19 AC 11 ms
5,656 KB
testcase_20 AC 15 ms
6,164 KB
testcase_21 AC 5 ms
5,180 KB
testcase_22 AC 55 ms
8,744 KB
testcase_23 AC 111 ms
12,276 KB
testcase_24 AC 47 ms
8,676 KB
testcase_25 AC 95 ms
12,228 KB
testcase_26 AC 92 ms
12,168 KB
testcase_27 AC 88 ms
12,252 KB
testcase_28 AC 95 ms
12,228 KB
testcase_29 AC 94 ms
12,324 KB
testcase_30 AC 90 ms
12,372 KB
testcase_31 AC 94 ms
12,296 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Possible precedence problem on bitwise & operator at Main.pl line 6.
Main.pl syntax OK

ソースコード

diff #

@0=@1=0;
($a,$b)=glob(<>),@{$|}=map{$_+$a,$_-$b}@{--$|}for 1..<>;
@0=sort{$a<=>$b}@0;
@1=sort{$b<=>$a}@1;
$b= ~0;
$_=$0[$i]+$1[$j],$b>abs?$b=abs:/-/?$i++:$j++while$i<@0&$j<@1;
print$b
0