![]() |
||||||||||
|
||||||||||
Xor sumTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others)Total Submission(s): 5802 Accepted Submission(s): 1615 Problem Description Given a sequence of integers of length n, find the shortest consecutive subsequence witch XOR sum not less than k. If there are multiple consecutive subsequences of the same length, print the consecutive subsequence with the smallest left end point. If there are no consecutive subsequence witch XOR sum not less than k, just print "-1". Input The first line contains a single integer t (t<=100) representing the number of test cases in the input. Then t test cases follow. The first line of each test case contains two integers n (1<=n<=100000) and k (0<=k<2^30), representing the length of sequence. The second line of each test contains n integers ai (0<=ai<2^30), representing the integers in sequence. The number of test witch n>1000 does not exceed 5. Output For each test case, print two integers in one line, representing the left end point and right end point of the consecutive subsequence. If there are no consecutive subsequence witch XOR sum not less than k, print "-1" in one line. Sample Input
Sample Output
Source | ||||||||||
|