0

Win the Boxing Competition. Code it if you can.

There are two teams with 5 players each. Everyone has assigned their power score based on their performance and ability. At a time only two players can be in the ring. Your target is to make the appropriate pairing so that you can win the tournament or win the maximum matches if you are the captain of team B. Also calculate the maximum number of possible pairings Sample input: Enter Power of team A players: 12 16 43 35 22 Enter Power of team B players: 16 10 18 38 55 Sample output: Arrangement of team A players: 12 16 43 35 22 Arrangement of team B players: 16 18 10 38 55 Possible ways: 4 Explanation: Arrangement of team A players: 12 16 43 35 22 Arrangement of team B players: 16 18 10 38 55 & Arrangement of team A players: 12 16 43 35 22 Arrangement of team B players: 16 18 10 55 38 & Arrangement of team A players: 12 16 43 35 22 Arrangement of team B players: 16 18 55 38 10 & Arrangement of team A players: 12 16 43 35 22 Arrangement of team B players: 16 18 55 10 38 In all cases, Team B is winning 4 matches. and the tournament is won with the best possible score. Please upvote if you find this challenge interesting. Comment for any clarification.

5th Jul 2021, 2:33 PM
Sandeep Kumar
Sandeep Kumar - avatar
3 Réponses
+ 4
Maybe, post in your feed? It will be more correct (read the description of Louis' thread which Lisa linked to; Q&A is only for real programming- and SoloLearn-questions now), and it has more comment functionality (though, there will be no Best Answer option).
10th Jul 2021, 6:08 AM
#0009e7 [get]
#0009e7 [get] - avatar
+ 3
There is an extra thread for challenges: https://www.sololearn.com/Discuss/1270852/?ref=app
5th Jul 2021, 2:36 PM
Lisa
Lisa - avatar
+ 1
https://code.sololearn.com/ca23a13a13A1/?ref=app
16th Jul 2021, 1:11 PM
michal