码迷,mamicode.com
首页 >  
搜索关键字:usaco 2008 nov gold    ( 2742个结果
USACO 2011 Jan Gold 3. Roads and Planes
题意: 给出一个n个结点m条边有向图,可能有负权边; 但是存在负权边a->b则不会有某个路径可以从b到a; 求一个源点s到所有点的最短路(无解输出"NO PATH"); n 题解: 高高兴兴的写了一发spfa,O(km)嘛; 然后就TLE了,这题丧心病狂的把spfa卡掉了; 这时候理所当然的想到了dij+heap,写到一半想起来不支持负权边; 所以这个不是一个简单的单源最...
分类:其他好文   时间:2015-06-15 09:26:24    阅读次数:132
BZOJ 2060: [Usaco2010 Nov]Visiting Cows 拜访奶牛( dp )
树形dp..水------------------------------------------------------------------------#include#include#include#include#define rep( i , n ) for( int i = 0 ; i...
分类:其他好文   时间:2015-06-14 21:24:19    阅读次数:175
TNS-12541: TNS:no listener , TNS-12542: TNS:address already in use
查看数据库监听状态不对$ lsnrctl statusLSNRCTL for IBM/AIX RISC System/6000: Version 10.2.0.5.0 - Production on 05-NOV-2012 08:54:08Copyright (c) 1991, 2010, Orac...
分类:其他好文   时间:2015-06-11 22:45:49    阅读次数:238
BZOJ 1642: [Usaco2007 Nov]Milking Time 挤奶时间( dp )
水dp先按开始时间排序 , 然后dp.dp( i ) 表示前 i 个时间段选第 i 个时间段的最优答案 , 则 dp( i ) = max( dp( j ) ) + w_i ( 0 #include#include#include#define rep( i , n ) for( int i = 0...
分类:其他好文   时间:2015-06-09 21:31:41    阅读次数:102
LightOJ 1030 Discovering Gold【概率】
题目链接:http://www.lightoj.com/volume_showproblem.php?problem=1030 题意:基础概率题。 代码:#include #include #include #include #include #include ...
分类:其他好文   时间:2015-06-08 23:29:29    阅读次数:348
POJ3623:Best Cow Line, Gold(后缀数组)
Description FJ is about to take his N (1 ≤ N ≤ 30,000) cows to the annual"Farmer of the Year" competition. In this contest every farmer arranges his cows in a line and herds them past the judges. ...
分类:编程语言   时间:2015-06-08 23:25:46    阅读次数:195
BZOJ 1679: [Usaco2005 Jan]Moo Volume 牛的呼声( )
一开始直接 O( n² ) 暴力..结果就 A 了... USACO 数据是有多弱 = =先sort , 然后自己再YY一下就能想出来...具体看code-------------------------------------------------------------------------...
分类:其他好文   时间:2015-06-08 21:15:16    阅读次数:116
BZOJ 1231: [Usaco2008 Nov]mixup2 混乱的奶牛( dp )
状压dpdp( x , S ) 表示最后一个是 x , 当前选的奶牛集合为 S , 则状态转移方程 : dp( x , S ) = Σ dp( i , S - { i } ) ( i ∈ S , abs( h[ i ] - h[ x ] ) > k )-----------------------....
分类:其他好文   时间:2015-06-08 18:48:51    阅读次数:124
【状压dp】Bzoj1231 [Usaco2008 Nov]mixup2 混乱的奶牛
Description混乱的奶牛 [Don Piele, 2007] Farmer John的N(4 .#include#define ll long longusing namespace std;const int maxn=16;int n,k,a[maxn];ll f[1k) ...
分类:其他好文   时间:2015-06-07 23:14:59    阅读次数:162
【线段树】Bzoj1230 [Usaco2008 Nov]lites 开关灯
DescriptionFarmer John尝试通过和奶牛们玩益智玩具来保持他的奶牛们思维敏捷. 其中一个大型玩具是牛栏中的灯. N (2 2 #include 3 using namespace std; 4 const int maxn=4e5+5; 5 6 int tag[maxn],su.....
分类:其他好文   时间:2015-06-07 18:45:19    阅读次数:111
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!