beatspread - bradendubois/competitive-programming GitHub Wiki
Beat the Spread!
ID: beatspread
Difficulty: 2.5
CPU Time: 1 second
Memory: 1024 MB
Solution
For this, consider that the sum would be two numbers, and the difference is the second number given. The higher number is the sum plus the difference, divided by two; the low would be a, minus this number. If the sum were smaller than the difference, or the sum of the two numbers were odd, then output "impossible".