結果
| 問題 |
No.904 サメトロ
|
| コンテスト | |
| ユーザー |
tails
|
| 提出日時 | 2019-10-11 22:02:47 |
| 言語 | Perl (5.40.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 239 bytes |
| コンパイル時間 | 87 ms |
| コンパイル使用メモリ | 6,824 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-25 07:30:19 |
| 合計ジャッジ時間 | 1,198 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 19 WA * 14 |
コンパイルメッセージ
Name "main::n" used only once: possible typo at Main.pl line 1. Main.pl syntax OK
ソースコード
$n=<>;
for(<>){
($a,$b)=glob;
push@a,$a; $sa+=$a;
push@b,$b; $sb+=$b;
}
($a)=sort{$b-$a}@a;
($b)=sort{$b-$a}@b;
$mina=$$a*2-$sa; $mina=0 if $mina<0; $sa-=$mina-1;
$minb=$$b*2-$sb; $minb=0 if $minb<0; $sb-=$minb-1;
print $sa<$sb?$sa:$sb;
tails