摘要: 1 /* 2 题意:二分图匹配 3 题解: 4 时间:2018.07.18 5 */ 6 7 #include 8 using namespace std; 9 10 typedef long long LL; 11 const int MAXN = 100005; 12 const LL MOD7 = 1e9+7; 13 14 struct Edge 15... 阅读全文
posted @ 2018-07-18 11:34 LeeSongt 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 1 /* 2 题意:最近公共祖先 3 题解:tarjan算法实现 4 时间:2018.07.18 5 */ 6 7 #include 8 using namespace std; 9 10 typedef long long LL; 11 const int MAXN = 100005; 12 const LL MOD7 = 1e9+7... 阅读全文
posted @ 2018-07-18 11:17 LeeSongt 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 1 /* 2 题意:POJ2796 给定一个长度为n的数组,求sum(a[i])*min(a[i)最大的一段区间。 3 思路:枚举每个a[i],求最左边和最右边的距离。利用单调栈求左右区间 4 时间:2018.07.17 5 */ 6 // #include 7 #include 8 #include 9 using namespace std; 10 11... 阅读全文
posted @ 2018-07-17 22:17 LeeSongt 阅读(110) 评论(0) 推荐(0) 编辑
摘要: 1 /* 2 题意:n,k 7 #include 8 #include 9 using namespace std; 10 11 typedef long long LL; 12 const int MAXN=1000005; 13 const LL MOD7 = 1e9+7; 14 15 int a[MAXN]; 16 int n,K; 17 18 struct Nod... 阅读全文
posted @ 2018-07-17 21:10 LeeSongt 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 using namespace std; 3 4 typedef long long LL; 5 const int MOD7 = 1e9 + 7; 6 const int MOD9 = 1e9 + 9; 7 const int imax_n = 1e5 + 7; 8 LL add(LL a, LL b, LL mod) 9 { ... 阅读全文
posted @ 2018-07-13 08:26 LeeSongt 阅读(1086) 评论(0) 推荐(0) 编辑
摘要: 1 /* 2 题意:1 7 using namespace std; 8 9 typedef long long LL; 10 const int MAXN=100005; 11 const LL MOD7 = 1e9+7; 12 13 int check[MAXN]; 14 int prime[MAXN]; 15 int mu[MAXN]; 16 int fmu[MAXN];... 阅读全文
posted @ 2018-07-11 22:42 LeeSongt 阅读(162) 评论(0) 推荐(0) 编辑