zhber
有好多做过的题没写下来,如果我还能记得就补吧

随笔分类 -  二分法

1 2 下一页
cf671B Robin Hood
摘要:We all know the impressive story of Robin Hood. Robin Hood uses his archery skills and his wits to steal the money from rich, and return it to the poo 阅读全文
posted @ 2017-08-04 13:02 zhber 阅读(832) 评论(0) 推荐(0)
Spoj-NETADMIN Smart Network Administrator
摘要:The citizens of a small village are tired of being the only inhabitants around without a connection to the Internet. After nominating the future netwo 阅读全文
posted @ 2017-08-04 10:57 zhber 阅读(163) 评论(0) 推荐(0)
cf703C Chris and Road
摘要:C. Chris and Road time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output And while Mishka is en 阅读全文
posted @ 2016-08-07 12:15 zhber 阅读(386) 评论(0) 推荐(1)
cf702C Cellular Network
摘要:C. Cellular Network time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output You are given n poin 阅读全文
posted @ 2016-08-05 22:29 zhber 阅读(386) 评论(0) 推荐(0)
cf702B Powers of Two
摘要:B. Powers of Two time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output B. Powers of Two time l 阅读全文
posted @ 2016-08-05 22:24 zhber 阅读(256) 评论(0) 推荐(0)
cf700A As Fast As Possible
摘要:On vacations n pupils decided to go on excursion and gather all together. They need to overcome the path with the length l meters. Each of the pupils 阅读全文
posted @ 2016-07-23 13:09 zhber 阅读(308) 评论(0) 推荐(0)
cf701C They Are Everywhere
摘要:Sergei B., the young coach of Pokemons, has found the big house which consists of n flats ordered in a row from left to right. It is possible to enter 阅读全文
posted @ 2016-07-23 12:58 zhber 阅读(251) 评论(0) 推荐(0)
cf590B Chip 'n Dale Rescue Rangers
摘要:B. Chip 'n Dale Rescue Rangerstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputA team of furry res... 阅读全文
posted @ 2015-11-01 00:19 zhber 阅读(226) 评论(0) 推荐(0)
bzoj3173 [Tjoi2013]最长上升子序列
摘要:Description给定一个序列,初始为空。现在我们将1到N的数字插入到序列中,每次将一个数字插入到一个特定的位置。每插入一个数字,我们都想知道此时最长上升子序列长度是多少?Input第一行一个整数N,表示我们要将1到N插入序列中,接下是N个数字,第k个数字Xk,表示我们将k插入到位置Xk(0#i... 阅读全文
posted @ 2015-01-30 23:34 zhber 阅读(398) 评论(0) 推荐(0)
bzoj2654 tree
摘要:Description 给你一个无向带权连通图,每条边是黑色或白色。让你求一棵最小权的恰好有need条白色边的生成树。 题目保证有解。Input 第一行V,E,need分别表示点数,边数和需要的白色边数。 接下来E行 每行s,t,c,col表示这边的端点(点从0开始标号),边权,颜色(0白... 阅读全文
posted @ 2015-01-28 00:23 zhber 阅读(551) 评论(0) 推荐(0)
bzoj1717 [Usaco2006 Dec]Milk Patterns 产奶的模式
摘要:Description农夫John发现他的奶牛产奶的质量一直在变动。经过细致的调查,他发现:虽然他不能预见明天产奶的质量,但连续的若干天的质量有很多重叠。我们称之为一个“模式”。 John的牛奶按质量可以被赋予一个0到1000000之间的数。并且John记录了N(1=height[i-1]-1而且按... 阅读全文
posted @ 2015-01-14 09:05 zhber 阅读(287) 评论(0) 推荐(0)
bzoj1146 [CTSC2008]网络管理Network
摘要:DescriptionM公司是一个非常庞大的跨国公司,在许多国家都设有它的下属分支机构或部门。为了让分布在世界各地的N个部门之间协同工作,公司搭建了一个连接整个公司的通信网络。该网络的结构由N个路由器和N-1条高速光缆组成。每个部门都有一个专属的路由器,部门局域网内的所有机器都联向这个路由器,然后再... 阅读全文
posted @ 2015-01-12 22:01 zhber 阅读(241) 评论(0) 推荐(0)
bzoj2756 [SCOI2012]奇怪的游戏
摘要:DescriptionBlinker最近喜欢上一个奇怪的游戏。这个游戏在一个 N*M 的棋盘上玩,每个格子有一个数。每次 Blinker 会选择两个相邻的格子,并使这两个数都加上 1。现在 Blinker 想知道最少多少次能使棋盘上的数都变成同一个数,如果永远不能变成同一个数则输出-1。Input输... 阅读全文
posted @ 2015-01-11 10:39 zhber 阅读(165) 评论(0) 推荐(0)
bzoj2348 [Baltic 2011]Plagiarism
摘要:Description世界编程大赛的选手们提交N份程序文件f1, …,fN给评测系统。在将评测结果正式公布之前,评委会想要排除一切可能的剽窃现象。他们已有一个对比程序,用来比较两份程序文件,并判断它们是否太过相似了。然而程序文件的数目相当大,把每两份(一对,pair)文件都进行比较的话将花太多的时间... 阅读全文
posted @ 2014-12-24 20:00 zhber 阅读(311) 评论(0) 推荐(0)
bzoj1486 [HNOI2009]最小圈
摘要:很容易看出0/1分数规划但是……好久没写我都忘了怎么做二分+spfa判负环啦01分数规划是这样的:有一堆物品,每个都有价值a[i],和代价b[i]。要使所有物品中取到的Σa[i]/Σb[i]取最值。设k为一个可能的取值,那么令d[i]=a[i]-k*b[i]。这题中a[i]就是第i条边的权,b[i]... 阅读全文
posted @ 2014-12-23 16:37 zhber 阅读(239) 评论(0) 推荐(0)
cf493C Vasya and Basketball
摘要:C. Vasya and Basketballtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputVasya follows a basketbal... 阅读全文
posted @ 2014-12-04 08:43 zhber 阅读(277) 评论(0) 推荐(0)
2014.10.29模拟赛【买汽水】
摘要:1. 买汽水【问题描述】暑期集训一共N天,大家都辛苦了,Symbol准备给大家买汽水,但是钱只有M。每天买汽水的花销都是不固定的,如果不够钱,买到的汽水不够大家一起喝,那样子不太好对不对?所以我们要买的话,就得让每个人都能喝到汽水要不我们那天就不买了。现在给出每天买汽水的花销,请问我们一共最多能够花... 阅读全文
posted @ 2014-10-29 23:57 zhber 阅读(340) 评论(0) 推荐(0)
2014.10.28模拟赛【时间与空间之旅】
摘要:Porble 1时间与空间之旅(tstrip.*)题目描述公元22××年,宇宙中最普遍的交通工具是spaceship。spaceship的出现使得星系之间的联系变得更为紧密,所以spaceship船长也成了最热门的职业之一。当然,要成为一名出色的船长,必须通过严格的考核,例如下面是最简单的问题中的一... 阅读全文
posted @ 2014-10-28 15:54 zhber 阅读(645) 评论(0) 推荐(0)
bzoj2144 跳跳棋
摘要:Description跳跳棋是在一条数轴上进行的。棋子只能摆在整点上。每个点不能摆超过一个棋子。我们用跳跳棋来做一个简单的游戏:棋盘上有3颗棋子,分别在a,b,c这三个位置。我们要通过最少的跳动把他们的位置移动成x,y,z。(棋子是没有区别的)跳动的规则很简单,任意选一颗棋子,对一颗中轴棋子跳动。跳... 阅读全文
posted @ 2014-10-27 22:17 zhber 阅读(1273) 评论(0) 推荐(1)
cf479D Long Jumps
摘要:D. Long Jumpstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputValery is a PE teacher at a school i... 阅读全文
posted @ 2014-10-27 20:57 zhber 阅读(272) 评论(0) 推荐(0)

1 2 下一页