上一页 1 ··· 21 22 23 24 25 26 27 28 29 ··· 68 下一页
摘要: 思路: http://blog.sina.com.cn/s/blog_6d5aa19a0100o73m.html//By SiriusRen#include #include #include using namespace std;#define N 20005int n,k,x... 阅读全文
posted @ 2017-01-12 17:59 SiriusRen 阅读(110) 评论(0) 推荐(0) 编辑
摘要: 思路: 点分治//By SiriusRen#include #include #include using namespace std;#define N 10005int n,k,xx,yy,first[N],next[N*2],v[N*2],w[N*2],tot;int f[N... 阅读全文
posted @ 2017-01-12 17:57 SiriusRen 阅读(160) 评论(0) 推荐(0) 编辑
摘要: 思路: 搞一个前缀异或和一次从左往右 另一次从右往左 异或最大值用字典树搞一搞//By SiriusRen#include #include #include using namespace std;#define N 400500int n,a[N],cnt=1,ch[N*20]... 阅读全文
posted @ 2017-01-12 17:54 SiriusRen 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 思路: 偷懒用的STL//By SiriusRen#include #include using namespace std;struct Node{int id,w;}jy;dequeqmin,qmax;int n,k,xx,t,ans;int main(){ scanf... 阅读全文
posted @ 2017-01-12 17:51 SiriusRen 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 思路: 最大费用最大流 i->i+1 连边k 费用0 i->i+m (大于n的时候就连到汇) 连边1 费用a[i]//By SiriusRen#include #include #include #include using namespace std;#define N 100... 阅读全文
posted @ 2017-01-12 17:48 SiriusRen 阅读(114) 评论(0) 推荐(0) 编辑
摘要: 思路: 考虑离线处理 显然 l固定时 r越大 ans越大 那我们不妨按照l从小到大排序l->l+1的时候 l到next[l]这段区间都跟a[l]取min就好了搞颗线段树维护一下//By SiriusRen#include #include #include using names... 阅读全文
posted @ 2017-01-12 17:46 SiriusRen 阅读(188) 评论(0) 推荐(0) 编辑
摘要: 思路: 主席树 做完BZOJ 3123 觉得这是道水啊…… 然后狂RE 狂MLE 要来数据 忘把deep[1]设成1了…………………………. 啊wocccccccccccccccc//By SiriusRen#include #include #include using nam... 阅读全文
posted @ 2017-01-12 17:44 SiriusRen 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 思路: T的最小公倍数是12 那么12以内暴力 整除12 的部分用矩阵快速幂//By SiriusRen#include #include #include using namespace std;int n,m,st,ed,k,nfish,T,p[5],can[13][55];s... 阅读全文
posted @ 2017-01-11 11:28 SiriusRen 阅读(167) 评论(0) 推荐(0) 编辑
摘要: 思路: 同BZOJ1101 就是加个容斥 … http://blog.csdn.net/qq_31785871/article/details/54340241//By SiriusRen#include #include using namespace std;#define N... 阅读全文
posted @ 2017-01-11 08:38 SiriusRen 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 思路: 题目中的gcd(x,y)=d (x=k(注意是大于等于K) 这个很好求啊 就是(a/k)*(b/k)G(x,y)=P1*F(a,b,1)+P2*F(a,b,2)+P3*F(a,b,3)+….+Px*F(a,b,x)Ans=G(x,y)=ΣPx*(a/x)*(b/x)这不就... 阅读全文
posted @ 2017-01-11 08:12 SiriusRen 阅读(181) 评论(0) 推荐(0) 编辑
上一页 1 ··· 21 22 23 24 25 26 27 28 29 ··· 68 下一页