Time Limit: 1 Sec
Memory Limit: 256 MB
Submission:32
AC:8
Score:0
Ali recently started picking up passengers. Since he was very short of money, he took all the orders that he could pick up at once. He accepted a total of n orders, each with a remaining completion time and commission.
For the sake of convenience, Ali assumes that the current time is 0. He knows the remaining completion time and commission for each order. The time for completing each order is 1. How can he do more to get more commission.
The first line contains an integer n, which means that there are a total of n lists.
The second line contains n integers ai, indicating the remaining completion time of the i-th order
The third line contains n integers bi, indicating the commission of the i-th item.
The output contains an integer representing the maximum commission that Ali can get.
input:
3
1 3 1
6 2 3
output:
8