上一页 1 2 3 4 5 6 7 8 ··· 16 下一页
摘要: P2853 [USACO06DEC]牛的野餐Cow Picnic 1 #include<bits/stdc++.h> 2 using namespace std; 3 int n,m,k,p[10000],can[10000]; 4 int w[1000+15][1000+15]; 5 bool v 阅读全文
posted @ 2017-09-09 19:15 Alex丶Baker 阅读(106) 评论(0) 推荐(0) 编辑
摘要: P2194 HXY烧情侣 裸tarjan 1 #include<algorithm> 2 #include<iostream> 3 #include<cstring> 4 #include<cstdio> 5 #include<cmath> 6 #include<queue> 7 using nam 阅读全文
posted @ 2017-09-09 16:20 Alex丶Baker 阅读(162) 评论(0) 推荐(0) 编辑
摘要: P3119 [USACO15JAN]草鉴定Grass Cownoisseur tarjan缩点,正反spfa,枚举边,更新最大值 1 #include<bits/stdc++.h> 2 using namespace std; 3 #define maxn 1000000 4 #define inf 阅读全文
posted @ 2017-09-08 22:02 Alex丶Baker 阅读(212) 评论(0) 推荐(0) 编辑
摘要: 走楼梯升级版 Description在你成功地解决了上一道走楼梯后,xxy 不禁有些气恼,于是她又在楼梯上跳来跳去,想要你求出她跳的方案数。..xxy 站在一个 tot 阶楼梯下面,他每次可以往上跳 1—n 步,往下跳 1——m 步(由于地心引力跳得比较远),而且在往下跳的时候只能踩在往上跳时踩过的 阅读全文
posted @ 2017-09-08 18:02 Alex丶Baker 阅读(242) 评论(0) 推荐(0) 编辑
摘要: P2966 [USACO09DEC]牛收费路径Cow Toll Paths 把点按点权排序,floyd处理最短路径与最小的 ( 路径与最大点权的和),k作为中间节点,能更新的时候,k是当前最大的点权 1 #include<algorithm> 2 #include<iostream> 3 #incl 阅读全文
posted @ 2017-09-08 14:36 Alex丶Baker 阅读(268) 评论(0) 推荐(0) 编辑
摘要: P2207 上学路线route 正反两遍spfa,判断某条边是否是在最短路上,如果是的话就建边,跑最大流 1 #include<cstdio> 2 #include<queue> 3 #include<cstring> 4 #include<algorithm> 5 using namespace 阅读全文
posted @ 2017-09-07 19:51 Alex丶Baker 阅读(105) 评论(0) 推荐(0) 编辑
摘要: 2342. [SCOI2007]kshort k短路 阅读全文
posted @ 2017-09-07 17:52 Alex丶Baker 阅读(179) 评论(0) 推荐(0) 编辑
摘要: P2740 [USACO4.2]草地排水Drainage Ditches 最大流模板 1 #include<cstdio> 2 #include<algorithm> 3 using namespace std; 4 #define maxn 10000 5 #define inf 10000000 阅读全文
posted @ 2017-09-06 22:14 Alex丶Baker 阅读(132) 评论(0) 推荐(0) 编辑
摘要: P1318 积水面积 将每层可积水的面积加起来 每层可积水的面积=左边第一个比他大右边的所有空位+右边第一个比他大的左边的所有空位-这一层的所有空位(他指当前高度 1 #include<bits/stdc++.h> 2 using namespace std; 3 #define maxn 1000 阅读全文
posted @ 2017-09-06 20:04 Alex丶Baker 阅读(207) 评论(0) 推荐(0) 编辑
摘要: P1317 低洼地 模拟 1 #include<bits/stdc++.h> 2 using namespace std; 3 #define maxn 1000000 4 5 int n,h[maxn],tot; 6 bool if_; 7 char ch; 8 inline void read( 阅读全文
posted @ 2017-09-06 19:16 Alex丶Baker 阅读(486) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 16 下一页