AKOJ正在加载中...

1113: MathematicalGame

金币值:2 定数:1 时间限制:2.000 s 内存限制:1280 M
正确:1 提交:2 正确率:50.00% 命题人:
点赞量:0 收藏量:0 题目类型:程序

题目描述

     Xiao Ming likes to play mathematical games very much. One day, he gets a sequence of n positive integers. XOR (l , r) is defined as the XOR and of all numbers in a continuous interval. Now, Xiao Ming wants to know the intervals which make the XOR (l , r) become largest.

    Require l, r. 

输入格式

     There is an integer T at the first line, indicate the case of data.

     In each case, there is an integer N at the first line, indicate the length of the sequence. And there are N integers, a1, a2, … , an, at the second line. (N <= 1,000,000) 

输出格式

    In each case, the first line is “Case #k:”, k is the number of test cases, the next line includes two integers l and r, which separated by a space.

    l, r output in lexicographic order if there are multiple results.  

输入样例    复制

1
5
1 2 3 4 5

输出样例    复制

Case #1:
3 4