5278: Xor sum

内存限制:128 MB 时间限制:3.000 S
评测方式:文本比较 命题人:
提交:9 解决:5

题目描述

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".

输入

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.

输出

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.

样例输入 复制

2
3 2
1 2 2
9 7
3 1 3 2 4 0 3 5 1

样例输出 复制

2 2
5 7