Football Ties
According to the Premier League rules, the winner of a game gets $3$ points while the loser of a game gets $0$ points. On the other hand, if there is a draw, both sides get $1$ point each. Two teams $A$ and $B$ played several games against each other and finally ended up with the score of $X$ and $Y$ points respectively. We do not know how many games were played. Find the **minimum** possible n
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start