摘要: 那么我们开三个不上升队列, 第一个记录原来的蚯蚓, 第二个记录乘以p的蚯蚓 第三个记录乘以(1-p)的蚯蚓, 在记录每条就要入队列的时间,就可以求出增加的长度 每次比较三个队列的队首,取最大的值x的切。 将xp加入第二个队列的队尾 将x(1-p)加入第三个队列的队尾 (第二个第三个队列保证单调,上面 阅读全文
posted @ 2017-09-17 21:18 Kaiser- 阅读(173) 评论(0) 推荐(0) 编辑
摘要: Abwad在nbc即将完成她的程序的时候,急中生智拔掉了她电脑的电源线,争取到了宝贵的时间。作为著名论文《论Ctrl-C与Ctrl-V在信息学竞赛中的应用》的作者,他巧妙地使用了这种上古秘术,顺利扳回一城。 在决胜局中,Abwad决定和nbc鏖战字符串,比的是谁能更快地将一个“量子态的字符串”删除。 阅读全文
posted @ 2017-09-17 21:06 Kaiser- 阅读(258) 评论(0) 推荐(1) 编辑
该文被密码保护。 阅读全文
posted @ 2017-09-17 18:13 Kaiser- 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 斐波那契数列的定义为:k=0或1时,F[k]=k;k>1时,F[k]=F[k-1]+F[k-2]。数列的开头几项为0,1,1,2,3,5,8,13,21,34,55,…你的任务是判断给定的数字能否被表示成两个斐波那契数的乘积。 Input 第一行包含一个整数t(1<=t<=10),表示询问数量。接下 阅读全文
posted @ 2017-09-17 17:59 Kaiser- 阅读(129) 评论(0) 推荐(0) 编辑
摘要: 寒假来了,又到了小明和女神们约会的季节。 小明虽为屌丝级码农,但非常活跃,女神们常常在小明网上的大段发言后热情回复“呵呵”,所以,小明的最爱就是和女神们约会。与此同时,也有很多基友找他开黑,由于数量实在过于巨大,怎么安排时间便成了小明的一大心事。 我们已知小明一共有T的空闲时间,期间会有很多女神或者 阅读全文
posted @ 2017-09-17 17:12 Kaiser- 阅读(155) 评论(0) 推荐(0) 编辑
摘要: Alice is so popular that she can receive many flowers everyday. She has N vases numbered from 0 to N-1. When she receive some flowers, she will try to 阅读全文
posted @ 2017-09-17 16:13 Kaiser- 阅读(214) 评论(0) 推荐(0) 编辑
摘要: Yuanfang is puzzled with the question below: There are n integers, a 1, a 2, …, a n. The initial values of them are 0. There are four kinds of operati 阅读全文
posted @ 2017-09-17 15:53 Kaiser- 阅读(207) 评论(0) 推荐(0) 编辑
摘要: There is a company that has N employees(numbered from 1 to N),every employee in the company has a immediate boss (except for the leader of whole compa 阅读全文
posted @ 2017-09-17 15:38 Kaiser- 阅读(113) 评论(0) 推荐(0) 编辑
摘要: During the War of Resistance Against Japan, tunnel warfare was carried out extensively in the vast areas of north China Plain. Generally speaking, vil 阅读全文
posted @ 2017-09-17 15:25 Kaiser- 阅读(140) 评论(0) 推荐(0) 编辑
摘要: A lot of battleships of evil are arranged in a line before the battle. Our commander decides to use our secret weapon to eliminate the battleships. Ea 阅读全文
posted @ 2017-09-17 14:55 Kaiser- 阅读(125) 评论(0) 推荐(0) 编辑
摘要: For the daily milking, Farmer John's N cows (1 ≤ N ≤ 50,000) always line up in the same order. One day Farmer John decides to organize a game of Ultim 阅读全文
posted @ 2017-09-17 14:46 Kaiser- 阅读(127) 评论(0) 推荐(0) 编辑
摘要: Painting some colored segments on a line, some previously painted segments may be covered by some the subsequent ones. Your task is counting the segme 阅读全文
posted @ 2017-09-17 14:38 Kaiser- 阅读(158) 评论(0) 推荐(0) 编辑
摘要: In the game of DotA, Pudge’s meat hook is actually the most horrible thing for most of the heroes. The hook is made up of several consecutive metallic 阅读全文
posted @ 2017-09-17 14:22 Kaiser- 阅读(120) 评论(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-17 14:13 Kaiser- 阅读(153) 评论(0) 推荐(0) 编辑
摘要: 很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。 这让很多学生很反感。 不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问。当然,老师有时候需要更新某位同学的成绩。 Input本题目包含多组测试,请处理到文件结束。 在每个测试的第一行, 阅读全文
posted @ 2017-09-17 14:01 Kaiser- 阅读(100) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2017-09-17 13:53 Kaiser- 阅读(11) 评论(0) 推荐(0) 编辑
摘要: A Simple Problem with Integers You have N integers, A1, A2, ... , AN. You need to deal with two kinds of operations. One type of operation is to add s 阅读全文
posted @ 2017-09-17 13:34 Kaiser- 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 敌兵布阵 C国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的监测手段,所以每个工兵营地的人数C国都掌握的一清二楚,每个工兵营地的人数都 阅读全文
posted @ 2017-09-17 13:33 Kaiser- 阅读(113) 评论(0) 推荐(0) 编辑
摘要: [SCOI2009]生日礼物 小西有一条很长的彩带,彩带上挂着各式各样的彩珠。已知彩珠有N个,分为K种。简单的说,可以将彩带考虑为x轴,每一个彩珠有一个对应的坐标(即位置)。某些坐标上可以没有彩珠,但多个彩珠也可以出现在同一个位置上。 小布生日快到了,于是小西打算剪一段彩带送给小布。为了让礼物彩带足 阅读全文
posted @ 2017-09-17 13:18 Kaiser- 阅读(156) 评论(0) 推荐(0) 编辑
摘要: 城市C是一个非常繁忙的大都市,城市中的道路十分的拥挤,于是市长决定对其中的道路进行改造。城市C的道路是这样分布的:城市中有n个交叉路口,有些交叉路口之间有道路相连,两个交叉路口之间最多有一条道路相连接。这些道路是双向的,且把所有的交叉路口直接或间接的连接起来了。每条道路都有一个分值,分值越小表示这个 阅读全文
posted @ 2017-09-17 13:13 Kaiser- 阅读(152) 评论(0) 推荐(0) 编辑