結果

問題 No.507 ゲーム大会(チーム決め)
ユーザー tailstails
提出日時 2017-04-21 22:44:43
言語 Perl
(5.38.2)
結果
WA  
実行時間 -
コード長 207 bytes
コンパイル時間 724 ms
コンパイル使用メモリ 5,324 KB
実行使用メモリ 28,824 KB
最終ジャッジ日時 2023-09-27 11:28:37
合計ジャッジ時間 3,229 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 7 ms
5,388 KB
testcase_01 AC 6 ms
5,216 KB
testcase_02 AC 6 ms
5,088 KB
testcase_03 AC 6 ms
5,232 KB
testcase_04 AC 6 ms
5,340 KB
testcase_05 AC 6 ms
5,252 KB
testcase_06 AC 6 ms
5,224 KB
testcase_07 AC 182 ms
28,680 KB
testcase_08 AC 167 ms
28,764 KB
testcase_09 AC 78 ms
28,724 KB
testcase_10 AC 83 ms
28,588 KB
testcase_11 AC 90 ms
28,772 KB
testcase_12 AC 78 ms
28,572 KB
testcase_13 AC 190 ms
28,688 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

($n,$m)=glob<>;
$a0=<>;
@a=sort{$b-$a}<>;
if($m*2==$n){
	print $a[-1];
	exit;
}

$b=3e9;
for$i(0..$m-1){
	$x=$a[$i]+$a[$m*2-1-$i];
	$b=$x if $b>$x;
}
$o=-1;
for(@a){
	if($_+$a0>=$b){
		$o=$_;
	}
}
print $o;
0