- 博客(9)
- 收藏
- 关注
原创 2013年黑龙江省赛C题.Compilation【字符串匹配】
C.Compilation Time Limited: 10S Memory Limited: 64M Description: A program is made up of sentences.A sentence is made up of wprds.Our task is to find the number of the given N sentence
2013-05-19 22:45:03 869 3
原创 黑龙江省2012年ACM-ICPC省赛J题The least average cost【最小均值回路】
J.The least average cost Description: Given a weighted directed graph,try to find a circle that the ratio of the sum of weight and the number of edges is the minimum. Input: Input contains
2013-05-17 13:35:19 770
原创 hdu 2586 How far away ?【最近公共祖先】
http://acm.hdu.edu.cn/showproblem.php?pid=2586 题意: 题解: tarjan算法离线算法模板(因为这个算法也是tarjan发明的) 代码: #include #include #include #include using namespace std; const int N = 40040 , M = 80080; int n , m
2013-05-16 19:55:24 461
原创 Hdu 1532 Drainage Ditches【网络流】
网络流模板提 Sap模板: const int N = 220 , M = 2020; #define inf (1<<29) int gap[N] , dis[N] , pre[N] , cur[N]; int NV , n , m; struct Edge { int v , w , next; Edge () {} Edge(int v,int w,int nex
2013-05-16 00:18:22 533
原创 hdu1281【网络流】
http://acm.hdu.edu.cn/showproblem.php?pid=1281 题目: 题解: 代码: #include #include #include #include using namespace std; const int N = 220 , M = 20200; #define inf (1<<29) int gap[N] , dis[N] , pre
2013-05-15 08:30:51 470
原创 poj 3264 Balanced Lineup【ST算法(解区间最值)】
http://poj.org/problem?id=3264 题意: 题解: 代码: #include #include #include #include #include using namespace std; const int N = 50050; int n,m,h[N],m1[N][16],m2[N][16];//m1(max);m2(min) void init(
2013-05-13 20:20:29 471
原创 hrbeu Kth Largest (二重二分)
http://acm.hrbeu.edu.cn/index.php?act=problem&id=1211 题意: 题解: 代码: #include #include #include #include using namespace std; int n , k , m , T; int a[10010] , b[10010]; int main() { scanf("%
2013-05-13 19:55:10 451
原创 poj 3522 Slim Span【kruskal算法】
http://poj.org/problem?id=3522 题意: 题解: 代码: #include #include #include #include using namespace std; const int N = 111 , M = 10010; struct Edge { int u , v , w; }edge[M]; int n , m , E , f[
2013-05-13 19:10:04 466
原创 hdu 3666 THE MATRIX PROBLEM【差分约束系统】
http://acm.hdu.edu.cn/showproblem.php?pid=3666 题目大意: 题解: 代码: #include #include #include #include #include #include using namespace std; #define inf 1000000000 const int N = 805 , M = 50005
2013-05-13 18:44:50 509
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人