摘要: Description 现在请求你维护一个数列,要求提供以下两种操作:1、 查询操作。语法:Q L 功能:查询当前数列中末尾L个数中的最大的数,并输出这个数的值。限制:L不超过当前数列的长度。2、 插入操作。语法:A n 功能:将n加上t,其中t是最近一次查询操作的答案(如果还未执行过查询操作,则t 阅读全文
posted @ 2017-09-27 16:31 I__am 阅读(135) 评论(0) 推荐(0) 编辑
摘要: Description 第XXXX届NOI期间,为了加强各省选手之间的交流,组委会决定组织一场省际电子竞技大赛,每一个省的代表队由n名选手组成,比赛的项目是老少咸宜的网络游戏泡泡堂。每一场比赛前,对阵双方的教练向组委会提交一份参赛选手的名单,决定了选手上场的顺序,一经确定,不得修改。比赛中,双方的一 阅读全文
posted @ 2017-09-27 14:37 I__am 阅读(131) 评论(0) 推荐(0) 编辑
摘要: Description 给你一个n个数的数列,其中某个数出现了超过n div 2次即众数,请你找出那个数。 给你一个n个数的数列,其中某个数出现了超过n div 2次即众数,请你找出那个数。 Input 第1行一个正整数n。第2行n个正整数用空格隔开。 第1行一个正整数n。第2行n个正整数用空格隔开 阅读全文
posted @ 2017-09-25 17:01 I__am 阅读(134) 评论(0) 推荐(0) 编辑
摘要: The citizens of Bytetown, AB, could not stand that the candidates in the mayoral election campaign have been placing their electoral posters at all pl 阅读全文
posted @ 2017-09-25 16:36 I__am 阅读(155) 评论(0) 推荐(0) 编辑
摘要: Astronomers often examine star maps where stars are represented by points on a plane and each star has Cartesian coordinates. Let the level of a star 阅读全文
posted @ 2017-09-24 19:53 I__am 阅读(165) 评论(0) 推荐(0) 编辑
摘要: Recently yifenfei face such a problem that give you millions of positive integers,tell how many pairs i and j that satisfy F[i] smaller than F[j] stri 阅读全文
posted @ 2017-09-24 18:12 I__am 阅读(173) 评论(0) 推荐(0) 编辑
摘要: Suppose that the fourth generation mobile phone base stations in the Tampere area operate as follows. The area is divided into squares. The squares fo 阅读全文
posted @ 2017-09-22 15:50 I__am 阅读(143) 评论(0) 推荐(0) 编辑
摘要: 题目描述 有一束光/那瞬间/是什么痛得刺眼/你的视线是谅解/为什么舍不得熄灭/我逆着光却看见/那是泪光/那力量/我不想再去抵挡/面对希望/逆着光/感觉爱存在的地方/一直就在我身旁 Description Zyh养着n盆太阳花,它们被排在一列直线上。为了简化问题,太阳花的朝向只有向左和向右这两种。Zy 阅读全文
posted @ 2017-09-22 09:03 I__am 阅读(413) 评论(0) 推荐(0) 编辑
摘要: 题目描述 Abwad在nbc即将完成她的程序的时候,急中生智拔掉了她电脑的电源线,争取到了宝贵的时间。作为著名论文《论Ctrl-C与Ctrl-V在信息学竞赛中的应用》的作者,他巧妙地使用了这种上古秘术,顺利扳回一城。 在决胜局中,Abwad决定和nbc鏖战字符串,比的是谁能更快地将一个“量子态的字符 阅读全文
posted @ 2017-09-21 21:30 I__am 阅读(331) 评论(0) 推荐(0) 编辑
摘要: 题目描述 输入 输出 样例输入 5 97 样例输出 11 提示 题解 先不管p,通过列举前面几项,不难发现当i为偶数时,a[i]=a[i-1]+a[i-2],当i为奇数时,a[i]=a[i-1]+a[i-2]+1,具体证明还不会,希望有大佬能在讨论区讲讲 知道了a[i]的通项后,我们可以通过矩阵乘法 阅读全文
posted @ 2017-09-19 20:58 I__am 阅读(257) 评论(0) 推荐(1) 编辑