码迷,mamicode.com
首页 >  
搜索关键字:zoj 1649    ( 3447个结果
zoj 3231(上下界费用流)
题意:树上每个节点上有若干苹果,边上带权,问你最小费用使得书上的苹果方差最小。思路:上下费用流问题,参考http://blog.csdn.net/qq564690377/article/details/8870587代码如下: 1 /********************************....
分类:其他好文   时间:2014-05-16 21:50:35    阅读次数:491
ZOJ 3768Continuous Login(找规律然后二分)
Continuous Login Time Limit: 2 Seconds      Memory Limit: 131072 KB      Special Judge Pierre is recently obsessed with an online game. To encourage users to log in, this game will give user...
分类:其他好文   时间:2014-05-14 01:25:00    阅读次数:396
zoj Gao The Sequence
Gao The SequenceTime Limit:2 Seconds Memory Limit:65536 KBYou are given a sequence of integers,A1,A2,...,An. And you are allowed a manipulation on the...
分类:其他好文   时间:2014-05-13 19:49:14    阅读次数:277
临时代码。
zoj 3673 1 /** 2 6700417 3 **/ 4 #include 5 #include 6 #include 7 #include 8 #include 9 using namespace std;10 11 typedef unsigned long long LL;12 13 ...
分类:其他好文   时间:2014-05-13 18:07:32    阅读次数:234
ZOJ3675:Trim the Nails
Robert is clipping his fingernails. But the nail clipper is old and the edge of the nail clipper is potholed. The nail clipper's edge is N millimeters wide. And we use N characters('.' or '*') to rep...
分类:其他好文   时间:2014-05-13 15:05:54    阅读次数:264
ZOJ3671:Japanese Mahjong III
Mahjong is a game of skill, strategy and calculation and involves a certain degree of chance. In this problem, we concentrate on Japanese Mahjong, a variation of mahjong. For brief, all of the word ma...
分类:其他好文   时间:2014-05-13 14:59:51    阅读次数:356
ZOJ3673:1729
1729 is the natural number following 1728 and preceding 1730. It is also known as the Hardy-Ramanujan number after a famous anecdote of the British mathematician G. H. Hardy regarding a hospital vis...
分类:其他好文   时间:2014-05-13 14:52:34    阅读次数:314
ZOJ3669:Japanese Mahjong I
Mahjong is a game of skill, strategy and calculation and involves a certain degree of chance. In this problem, we concentrate on Japanese Mahjong, a variation of mahjong. For brief, all of the word ma...
分类:其他好文   时间:2014-05-13 13:54:14    阅读次数:463
ZOJ 3684 Destroy 树的中心
中心节点就是树的中心,2遍dfs求到树的直径,而中心一定在直径上,顺着直径找到中心就够了。 然后可以一遍树形DP找到最小值或者二分+判断是否访问到叶子节点。 #include #include #include #include using namespace std; struct node { int next; int power; int length...
分类:其他好文   时间:2014-05-13 11:28:38    阅读次数:306
zoj 3627(贪心)
思路:半夜了思路有点混乱wa了好几发。一开始坑定两个人距离为m才能获得最大的收益,所以我们就可以枚举单个端点,当距离达到m时在一同一个方向走这是我们只需要算一下剩下几秒,左右两边贪心去最大的即可。代码如下: 1 /*******************************************...
分类:其他好文   时间:2014-05-13 09:58:02    阅读次数:268
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!