#3501. [Usaco2007 China]The Bovine Accordion and Banjo Orchestra 音乐会

[Usaco2007 China]The Bovine Accordion and Banjo Orchestra 音乐会

Description

image

Format

Input

第1行输入N,之后N行输入Ai,之后N行输入Bi.

Output

输出最大收益.

Samples

3
1
1
5
5
1
1

INPUT DETAILS:

There are 6 cows: 3 accordionists and 3 banjoists. The accordionists have
talent levels (1, 1, 5), and the banjoists have talent levels (5, 1, 1).
17

Limitation

手风琴手3和班卓琴手1搭配,创造收益25美元.手风琴手1和手风琴手2喝酒用了4美元.同样班卓琴手2和班卓琴手3用了4美元.最后收益为25 -4-4=17美元.