Answer Only in C++: Sanjiv Kapoor is a very well know chef in the world once he was going through the street as soon as Chef passed by his belongings in his basement and was surprised to find NN's...


Answer Only in C++:<br>Sanjiv Kapoor is a very well know chef in the world once he was going through the street<br>as soon as Chef passed by his belongings in his basement and was surprised to find<br>NN's metal balls, each with a different weight. Our chef who is always looking for a way<br>to make money has decided to sell these balls for free. Luckily for him, he found a dealer<br>who was ready to buy these balls but the dealer agreed to buy only MM balls. The seller<br>also tells the chef that if you make a distinction between the low and high weight of the<br>steel balls, you will get more money.<br>Help the Chef to find the MM metal balls that he should give to the seller to earn a lot of<br>money.<br>Sample Input:<br>2<br>9<br>12 8 4 15 7 1 16 14 11<br>7<br>1 1 2 19 13 1 4<br>4<br>Sample Output:<br>1<br>

Extracted text: Answer Only in C++: Sanjiv Kapoor is a very well know chef in the world once he was going through the street as soon as Chef passed by his belongings in his basement and was surprised to find NN's metal balls, each with a different weight. Our chef who is always looking for a way to make money has decided to sell these balls for free. Luckily for him, he found a dealer who was ready to buy these balls but the dealer agreed to buy only MM balls. The seller also tells the chef that if you make a distinction between the low and high weight of the steel balls, you will get more money. Help the Chef to find the MM metal balls that he should give to the seller to earn a lot of money. Sample Input: 2 9 12 8 4 15 7 1 16 14 11 7 1 1 2 19 13 1 4 4 Sample Output: 1

Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here