Given an array nums and a list of queries where each query is a pair [x, m], answer each query with the maximum value of x XOR nums[j] over elements nums[j] that are at most m. If no element satisfies nums[j] <= m, the answer for that query is -1.
Input: A JSON object {"nums": [<non-negative integers>], "queries": [[x, m], ...]}.
Output: Return an array of answers, one per query, in the original query order.
Input: {"nums":[0,1,2,3,4],"queries":[[3,1],[1,3],[5,6]]}
Output: [3,3,7]
Explanation: Query answers are 3, 3 and 7 respectively.Input: {"nums":[5,2,4,6,6,3],"queries":[[12,4],[8,1],[6,3]]}
Output: [15,-1,5]
Explanation: The second query has no element <= 1, so it returns -1.1 <= len(nums) <= 10^51 <= len(queries) <= 10^50 <= nums[j], x, m < 2^20