October Lunchtime AND Plus OR question solution - October Lunchtime AND Plus OR question solution Read the problem statement carefully- Given an integer x x , find two non-negative integers a a and b b such that ( a ∧ b ) + ( a ∨ b ) = x ( a ∧ b ) + ( a ∨ b ) = x , where ∧ ∧ is the bitwise AND operation and ∨ ∨ is the bitwise OR operation. Input The first line of the input contains a single integer T T denoting the number of test cases. The description of T T test cases follows. The first and only line of each test case contains a single integer x x . Output If there is no valid pair ( a , b ) ( a , b ) , print a single line containing the integer − 1 − 1 . Otherwise, print a single line containing two space-separated integers a a and b b . If there are multiple solutions, you may print any one of them. Constraints 1 ≤ T ≤ 10 5 1 ≤ T ≤ 10 5 1 ≤ x ≤ 10 18 1 ≤ x ≤ 10 18 Subtasks Subtask #1 (30 points): 1 ≤ T ≤ 200 1 ≤ T ≤ 200 1 ≤ x ≤ 200 1 ≤ x ≤ 200 Subtask #2 (70
Technical Keeda is best plateform for learning coding, Programming,competitive programming ,c++ language. Here we Provide best explaination of Programming question also Here You can boost your technical knowledge.You Will get aware of latest technology available in market.