Company: wipro_2nov
Difficulty: medium
Toy Factory Quality Match Problem Description You are managing two production lines in a toy factory. Line A produces toys according to the specifications listed in array A. Line B produces toys according to the specifications listed in array B. Your manager gives you k upgrade tokens . Using one upgrade token, you can improve the quality rating of any single toy from Line B by exactly 1 unit . However, once you upgrade a specific toy, you cannot upgrade that same toy again. Your goal is to make as many toys from Line B match exactly with the corresponding toys from Line A as possible. Input Format The first line contains an integer n, the number of toys in Line A. The next n lines each contain an integer, the quality rating of toys in Line A. The next line contains an integer n, the number of toys in Line B. The next n lines each contain an integer, the quality rating of toys in Line B. The last line contains an integer k, the number of upgrade tokens you can use. Output Format Return