码迷,mamicode.com
首页 >  
搜索关键字:usaco2008    ( 358个结果
BZOJ 1601: [Usaco2008 Oct]灌水( MST )
MST , kruskal 直接跑----------------------------------------------------------------------#include#include#include#include#include#define rep( i , n ) fo...
分类:其他好文   时间:2015-06-03 23:05:08    阅读次数:123
BZOJ 1602: [Usaco2008 Oct]牧场行走( 最短路 )
一棵树..或许用LCA比较好吧...但是我懒...写了个dijkstra也过了..----------------------------------------------------------------------------#include#include#include#include#...
分类:其他好文   时间:2015-06-03 13:23:59    阅读次数:99
【最小生成树】Bzoj1601[Usaco2008 Oct]灌水
DescriptionFarmer John已经决定把水灌到他的n(1 2 #include 3 using namespace std; 4 const int maxn=305; 5 6 int p[maxn]; 7 int find(int x){return p[x]==x?x:p[x]=....
分类:其他好文   时间:2015-06-03 06:09:05    阅读次数:107
BZOJ 1600 Usaco2008 Oct 建造栅栏
题目大意:给定一个长度为nn(n≤2500n\leq 2500)的木板,要求分成4部分拼成一个面积为正的四边形,求方案数 能拼成一个面积为正的四边形等价于任意一个木板的长度<n2<\frac n2 切割点有3个,前两个枚举,第三个O(1)计算即可 时间复杂度O(n2)O(n^2)#include #include #include #...
分类:其他好文   时间:2015-05-03 16:04:15    阅读次数:147
BZOJ 1603 Usaco2008 Oct 打谷机 DFS
题目大意:给定一棵树,每个点是一个齿轮,1号齿轮顺时针旋转,每条边有同向和反向两种连接方式,求n号齿轮的旋转方向 DFS一遍即可#include #include #include #include #define M 1010 using namespace std; struct abcd{ int t...
分类:其他好文   时间:2015-05-03 16:00:43    阅读次数:134
BZOJ1595 [Usaco2008 Jan]人工湖
直接模拟。。。从最低的开始向两边拓展= = 1 /************************************************************** 2 Problem: 1595 3 User: rausen 4 Language: C++ 5 ...
分类:其他好文   时间:2015-04-27 00:21:13    阅读次数:169
BZOJ1593 [Usaco2008 Feb]Hotel 旅馆
裸上线段树,就是记的东西有点多。。。每个点记区间左端最长0,右端最长0,中间最长0,和tag表示是否全为0/1直接更新就好,查询的时候先查左儿子,然后查中间,最后查右儿子。。。 1 /*********************************************************....
分类:其他好文   时间:2015-04-27 00:04:13    阅读次数:249
BZOJ1230 [Usaco2008 Nov]lites 开关灯
区间not,求区间1的个数。。。线段树裸题然而窝并不会线段树我们可以对序列分块,每个块记录0/1的个数和tag表示又没有区间not过就好了 1 /************************************************************** 2 Problem:...
分类:其他好文   时间:2015-04-11 19:12:49    阅读次数:136
1592: [Usaco2008 Feb]Making the Grade 路面修整
1592: [Usaco2008 Feb]Making the Grade 路面修整Time Limit:10 SecMemory Limit:162 MBSubmit:428Solved:316[Submit][Status][Discuss]DescriptionFJ打算好好修一下农场中某条凹凸...
分类:其他好文   时间:2015-04-10 14:54:45    阅读次数:142
1596: [Usaco2008 Jan]电话网络
1596: [Usaco2008 Jan]电话网络Time Limit:10 SecMemory Limit:162 MBSubmit:601Solved:265[Submit][Status][Discuss]DescriptionFarmer John决定为他的所有奶牛都配备手机,以此鼓励她们互...
分类:其他好文   时间:2015-04-09 00:41:41    阅读次数:150
358条   上一页 1 ... 27 28 29 30 31 ... 36 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!