5499: 暑期营第三天 invest

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

Input

Output

Sample Input Copy

3
2 3 5
2 2 1
10

Sample Output Copy

3