Two Numbers
CodeChefOpen on judge ↗
Two Numbers You’re given two integer a & b you can perform operations any number of times (including zero). • choose an positive integer d • perform exactly one of the following actions: ◦ add 2*d-1 to a, add 2*d to b ◦ add 2*d to a, add 2*d-1 to b You have to find out whether it is possible to make a=b or not Input • The first line of the input contains a single integer T denoting the number
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