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的更多相关文章
- codevs 1206 保留两位小数
http://codevs.cn/problem/1206/ 1206 保留两位小数 时间限制: 1 s 空间限制: 128000 KB 题目等级 : 青铜 Bronze 题解 查看运行结果 ...
- wikioi 1206 保留两位小数 【考查浮点数输入输出】
/*======================================================================== 1206 保留两位小数 题目描述 Descript ...
- (hzau)华中农业大学第四届程序设计大赛网络同步赛 G: Array C
题目链接:http://acm.hzau.edu.cn/problem.php?id=18 题意是给你两个长度为n的数组,a数组相当于1到n的物品的数量,b数组相当于物品价值,而真正的价值表示是b[i ...
- mysql报错"ERROR 1206 (HY000): The total number of locks exceeds the lock table size"的解决方法
1. 问题背景 InnoDB是新版MySQL(v5.5及以后)默认的存储引擎,之前版本的默认引擎为MyISAM,因此,低于5.5版本的mysql配置文件.my.cnf中,关于InnoD ...
- 【mysql】1206 SQLSTATE: HY000 (ER_LOCK_TABLE_FULL) 问题
最近在做一个项目,其中一需求是:部分数据库中的数据需要定时删除掉(满足一定条件,比如7天前的数据都不保留) 最初的执行方法: 使用Quartz定时执行数据库操作,进行数据删除,数据库操作使用delet ...
- 51nod 1206 && hdu 1828 Picture (扫描线+离散化+线段树 矩阵周长并)
1206 Picture 题目来源: IOI 1998 基准时间限制:2 秒 空间限制:131072 KB 分值: 160 难度:6级算法题 收藏 关注 给出平面上的N个矩形(矩形的边平行于X轴 ...
- 51nod 1206 Picture 矩形周长求并 | 线段树 扫描线
51nod 1206 Picture 矩形周长求并 | 线段树 扫描线 #include <cstdio> #include <cmath> #include <cstr ...
- MySQL解决[Err] 1206 - The total number of locks exceeds the lock table size问题
MySQL解决[Err] 1206 - The total number of locks exceeds the lock table size问题 查看MySQL版本:mysql>show ...
- HZAU 1207 Candies(线段树区间查询 区间修改)
[题目链接]http://acm.hzau.edu.cn/problem.php?id=1207 [题意]给你一个字符串,然后两种操作:1,将区间L,R更新为A或者B,2,询问区间L,R最长的连续的B ...
随机推荐
- 谷歌浏览器input中的text 和 button 水平对齐的问题
方法一 text 的vertical-align :top; 方法二 button的vertical-align: middle;
- 2014牡丹江——Known Notation
题目链接 题意: 输入一个长度不超过1000的字符串,包含数字(1-9)和星号(*).字符串中的空格已经丢失,所以连起来的数字串能够看成很多分开的数.也能够看成连续的数,即能够随意加入空格. 如今有两 ...
- REST --- Representational State Transfer --- 表现层状态转化
引用:阮一峰的网络日志 如果一个架构符合REST原则,就称它为RESTful架构. 要理解RESTful架构,最好的方法就是去理解Representational State Transfer这个词组 ...
- spring 编译时抱错纪录class path resource [spring/] cannot be resolved to URL because it does not exist
class path resource [spring/] cannot be resolved to URL because it does not exist; 在 pom.xml 里添加如下代码 ...
- Unity3D游戏开发从零单排(六) - 人物运动及攻击连击
提要 今天要实现的是一个简单人物控制器. 包括用w,a,s,d来控制人物上下左右跑动,鼠标左击发出连招,都是基于老的lagacy的动画.尽管unity3d自带有charactorcontroller, ...
- 4.3 使用STM32控制MC20进行GPRS通讯
需要准备的硬件 MC20开发板 1个 https://item.taobao.com/item.htm?id=562661881042 GSM/GPRS天线 1根 https://item.taoba ...
- PyQt4设置窗口左上角的小图标
# -*- coding: utf-8 -*- """ ------------------------------------------------- File Na ...
- 剑指offer 面试29题
面试29题: 题目:顺时针打印矩阵(同LeetCode 螺旋矩阵打印) 题:输入一个矩阵,按照从外向里以顺时针的顺序依次打印出每一个数字,例如,如果输入如下矩阵: 1 2 3 4 5 6 7 8 9 ...
- requirejs源码分析: 路径
1. 没有设置baseUrl(一般我们都会设置baseurl) 在没有设置baseUrl时, 默认 baseurl: "./" 当指定data-mai ...
- 异常:Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005.
异常:Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} ...