Given an array nums and a list of queries, each query [x, m] asks for the maximum value of x XOR nums[j] over all elements nums[j] that are <= m. If no element is <= m, the answer is -1. Return the answers as an array, one per query in order. The input is JSON {nums, queries}.
Input: JSON {nums, queries}.
Output: Array — the answer for each query.
Input: {"nums":[0,1,2,3,4],"queries":[[3,1],[1,3],[5,6]]}
Output: [3,3,7]
Explanation: Best XOR under each limit.Input: {"nums":[5,2,4,6,6,3],"queries":[[12,4],[8,1],[6,3]]}
Output: [15,-1,5]
Explanation: Second query has no element <= 1.Input: {"nums":[10],"queries":[[5,20],[5,1]]}
Output: [15,-1]
Explanation: Limit filters the element.1<=nums,queries<=10^50<=value,x,m<=10^9