Limits 1s, 512 MB

October month of year 20** has been wonderful for our department .One team from our department has just arrived to KUET participating in the word final of ”ACM ICPC” and at the same time our department became champion in inter department football tournament.What a coincidence!!!
I will tell you the story later, let’s solve a problem for this time!!! Today is the prize giving ceremony but “Man of the Tournament” of this tournament yet to be decided. Committee members are having tough time with the calculations, they decided to go to the world finalist team for the solution.Then suddenly you have come to the committee saying “ Vhai, let them rest, ami bepar ta dekhtechi”. Then committee is describing the problem as follows:

You have got an array A consisting of N integers A1,A2,.....An. Ai represents the goal scored by each player i and You have got an array B consisting of N integers B1, B2, ..... BN. Bi represents yellow card conceded by those player i. For each goal a player gets 20 points and for each foul 10 points is deducted from each player. Finally, you need to calculate overall points gained by each player and tell the committee highest points gained by a single player.

Input

Input starts with an integer N (1 <= N <= 150) which denotes the number of players in the tournament.
Second line contains A1,A2,A3,.....AN (0 <= Ai <= 50) - the elements of the array A.
Third line contains B1, B2, B3, ..... BN (0 <= Bi <= 50) - the elements of the array B.

Output

For each test case you have to print highest points gained by a single player. If all the player fail to achieve positive valued points then you will print “0” ( zero without quotation mark ).

Sample

InputOutput
3
10 20 50 
2 4 6 
940

Submit

Login to submit.

Statistics

94% Solution Ratio
kzvd4729Earliest, Apr '19
kzvd4729Fastest, 0.0s
YulinaLightest, 0 B
Nusab19Shortest, 92B
Toph uses cookies. By continuing you agree to our Cookie Policy.