Answer to Question #12195 in C++ for manindra naresh
provide me the c-code for the below problem:
You have been named CEO of the struggling IPL team,KKR. The owner of KKR has given you the authority to select 3 batsmen with optimal investment of money.
You being a complete nerd has no idea of Cricket and also no knowledge about any of the players. So, now you have thought of a very strange idea to select the 3 batsmen.
You planned to arrange maximum number of players in their increasing order of price and decreasing order of Batting Average.
Once you got the list of those players in the order. You choose to select the middle 3 players.If the number of players in list is even then select middle two and a player immediate left to them.
Write the program for your selection algorithm.
Given the number of players and their Prices(in million rupees) and Batting Averages, print the total cost needed to be invested.
First line of input contains T, number of test cases. Following which there are 3T lines,
each three consecutive lines describes one test
Unfortunately, your question requires a lot of work and cannot be done for free. Submit it with all requirements as an assignment to our control panel and we'll assist you.