Cup of Jamshid

아직 제출이 없습니다시간 제한1초메모리 제한512 MB

문제

Jamshid, a great king of ancient Persia, is looking for the cup of divination, a miraculous cup through which one could observe all over the universe. He has asked Shahrasb, a great wizard who lives in Alborz mountains, for his help. 

Shahrasb told Jamshid that the cup is hidden somewhere in the Great Salt Desert, a large desert in the middle of ancient Persia, but he doesn't know its exact location. Furthermore, Jamshid can ask him several questions. In each question, Jamshid selects a point anywhere in Persia (inside or outside of the desert), and Shahrasb can use his magical powers to find the Katouzian distance between the cup and the selected point. 

Each point in Persia has integer xx and yy coordinates in the range \[109, 109]\[-10^9, 10^9]. The desert is a square region in the center, with xx and yy coordinates in the range \[5×108, 5×108]\[-5 \times 10^8, 5 \times 10^8]. The Katouzian distance between two points (x,y)(x, y) and (p,q)(p, q) is calculated as xpyq|x - p| \oplus |y - q|, where xp|x - p| is the absolute value of (xp)(x-p), and \oplus indicates bitwise XOR (exclusive OR).

Your task is to help Jamshid find the cup by asking Shahrasb a number of questions.

제한

  • 1T10001 \leq T \leq 1000,
  • 5×108a\[i],b\[i]5×108-5 \times 10^8 \leq a\[i], b\[i] \leq 5 \times 10^8.