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

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

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

题目描述

![image](file://22(11).jpg)

输入格式

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

输出格式

输出最大收益.

样例

样例输入

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  

数据范围与提示

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