[Solution] Chef and his Apps CodeChef Solution
Chef's phone has a total storage of MB. Also, Chef has apps already installed on his phone which occupy MB and MB respectively.
He wants to install another app on his phone whose memory requirement is MB. For this, he might have to delete the apps already installed on his phone. Determine the minimum number of apps he has to delete from his phone so that he has enough memory to install the third app.
Input Format
- The first line contains a single integer — the number of test cases. Then the test cases follow.
- The first and only line of each test case contains four integers and — the total memory of Chef's phone, the memory occupied by the two already installed apps and the memory required by the third app.
Output Format
For each test case, output the minimum number of apps Chef has to delete from his phone so that
Chef and his Apps CodeChef Solution
Change Row and Column Both CodeChef Solution
Adjacent Sum Parity CodeChef Solution
Retrieve the Array CodeChef Solution
Even Equal Odd CodeChef Solution
Xor and Multiply CodeChef Solution
KBG and GN-Theory CodeChef Solution
he can install the third app.
No comments:
Post a Comment