摘要: 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 阅读(210) 评论(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 阅读(498) 评论(0) 推荐(0) 编辑
摘要: U3357 C2-走楼梯 把下楼看成上楼 f[i]表示两次走到i的方案数 1 #include<cstdio> 2 #define N 10000001 3 #define mod 2333333 4 using namespace std; 5 int f[N],n; 6 int main() 7 阅读全文
posted @ 2017-09-06 11:49 Alex丶Baker 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 1821: [JSOI2010]Group 部落划分 Group 最小生成树 1 #include<algorithm> 2 #include<iostream> 3 #include<cstring> 4 #include<cstdio> 5 #include<queue> 6 #include< 阅读全文
posted @ 2017-09-06 11:47 Alex丶Baker 阅读(112) 评论(0) 推荐(0) 编辑