Official algorithmic problem description and constraints.
Chef and Chefina are competing against each other in a football game where the player scoring the maximum goals, wins.
It is known that the winner of the game receives A gold coins while the loser receives B gold coins.
Given that Chef scored X goals and Chefina scored Y goals (X≠Y), find the number of coins Chef would receive.
Detailed video explanations, mathematical intuition, and clean C++ implementation code.