hzau 1206 MathematicalGame

Posted gongpixin

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了hzau 1206 MathematicalGame相关的知识,希望对你有一定的参考价值。

1206: MathematicalGame

Time Limit: 2 Sec  Memory Limit: 1280 MB
Submit: 124  Solved: 15
[Submit][Status][Web Board]

Description

     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. 

Input

     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) 

 

Output

    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.  

Sample Input

1
5
1 2 3 4 5

Sample Output

Case #1:
3 4

HINT

 

以上是关于hzau 1206 MathematicalGame的主要内容,如果未能解决你的问题,请参考以下文章

HZAU-Image++软件gitee网址

HZAU国际影城(HZAU-Cineplex)——软件测试计划(Testing-Plan)

hzau 1209 Deadline(贪心)

hzau 1207 Candies

hzau 1203 One Stroke

hzau 1205 Sequence Number(二分)