Football and ICPC
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 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.
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 ).
3 10 20 50 2 4 6