码迷,mamicode.com
首页 > 其他好文 > 详细

hzau 1206 MathematicalGame

时间:2017-04-30 22:57:55      阅读:179      评论:0      收藏:0      [点我收藏+]

标签:include   next   games   ant   time   pac   ref   led   content   

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

标签:include   next   games   ant   time   pac   ref   led   content   

原文地址:http://www.cnblogs.com/bofengyu/p/6790507.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!