Company: Razorpay_1staug
Difficulty: easy
Hiring drive You are looking to hire front-end and back-end developers for a project that requires exactly N front-end developers and exactly M back-end developers. You receive applications from exactly (N + M) candidates, so every candidate must be hired for one of the two roles. Conditions: Every developer can work on either the front end or the back end, but not on both. The cost of each developer can be different. For the i -th developer the cost is F[i] dollars if that developer works on the front end, and B[i] dollars if that developer works on the back end. Assign exactly N of the (N + M) candidates to the front end and the remaining M candidates to the back end so that the total cost is as small as possible, and print the minimum total amount that it will cost the company to run this project. Input Format The first line contains a single integer T , the number of test cases. For each test case: The first line contains an integer N , the number of front-end developers required.