会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
wls001
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
14
15
16
17
18
19
20
21
下一页
2016年6月22日
Tarjan求极大强连通分量模板
摘要: 1 #include<iostream> 2 #include<cstring> 3 #include<cstdio> 4 #include<stack> 5 #include<algorithm> 6 #include<queue> 7 #include<cmath> 8 using namesp
阅读全文
posted @ 2016-06-22 21:16 wls001
阅读(187)
评论(0)
推荐(0)
2016年6月20日
NOIP201504推销员
摘要: 1 #include<iostream> 2 #include<cstring> 3 #include<algorithm> 4 #include<cmath> 5 #include<cstdio> 6 #include<queue> 7 #define LL long long 8 using n
阅读全文
posted @ 2016-06-20 21:07 wls001
阅读(419)
评论(0)
推荐(0)
2016年6月19日
最小费用最大流模板
摘要: 1 #include<iostream> 2 #include<algorithm> 3 #include<cstdio> 4 #include<cstring> 5 #include<cmath> 6 #include<queue> 7 #define inf 2147483647 8 using
阅读全文
posted @ 2016-06-19 21:28 wls001
阅读(177)
评论(0)
推荐(0)
2016年6月18日
spfa模板
摘要: 1 #include<iostream> 2 #include<cmath> 3 #include<algorithm> 4 #include<cstring> 5 #include<cstdio> 6 #include<queue> 7 #define inf 2147483647 8 using
阅读全文
posted @ 2016-06-18 23:39 wls001
阅读(127)
评论(0)
推荐(0)
dijkstra堆优化模板
摘要: 1 #include<iostream> 2 #include<cmath> 3 #include<algorithm> 4 #include<cstring> 5 #include<cstdio> 6 #include<queue> 7 #define inf 2147483647 8 using
阅读全文
posted @ 2016-06-18 23:24 wls001
阅读(397)
评论(0)
推荐(0)
网络流——增广路算法(dinic)模板 [BeiJing2006]狼抓兔子
摘要: 1 #include<iostream> 2 #include<cstring> 3 #include<algorithm> 4 #include<cmath> 5 #include<cstdio> 6 #include<queue> 7 using namespace std; 8 struct
阅读全文
posted @ 2016-06-18 12:54 wls001
阅读(179)
评论(0)
推荐(0)
网络流初步——增广路算法(EK)模板
摘要: 1 #include <iostream> 2 #include <queue> 3 #include<string.h> 4 using namespace std; 5 #define arraysize 201 6 int maxData = 0x7fffffff; 7 int a[222][
阅读全文
posted @ 2016-06-18 12:38 wls001
阅读(245)
评论(0)
推荐(0)
2016年3月27日
求大组合数
摘要: 众所周知 ,所以我们只需要求出m!和n!(m-n)!。 但是由于n和m都偏大,直接乘一定会爆掉(喜闻乐见(●'◡'●))。所以我们首先想到的是边乘边模,但是尝试了一组数据后我们神奇地发现答案不对。 但是我们知道另一种定理,n!%p=n!边乘边模的逆元。 所以这时候我们可以利用逆元来解决这个问题。 而
阅读全文
posted @ 2016-03-27 10:12 wls001
阅读(383)
评论(0)
推荐(0)
2016年1月28日
RMQ问题
摘要: 关于RMQ的问题我就直接截取刘汝佳的《算法竞赛训练指南》上的解释了
阅读全文
posted @ 2016-01-28 13:30 wls001
阅读(149)
评论(0)
推荐(0)
2016年1月27日
欧拉函数
摘要: 在数论,对正整数n,欧拉函数是小于n的数中与n互质的数的数目。首先我们给出欧拉函数的通式:其中p1, p2……pk为n的所有质因数,n是不为0的整数。以上式子是如何得到的呢?下面给出证明:先将n分解质因数为然后利用容斥原理来减去p1、p2……pk的倍数的个数,即。然后我们加上同时时两个因数的倍数的数...
阅读全文
posted @ 2016-01-27 13:51 wls001
阅读(181)
评论(0)
推荐(0)
上一页
1
···
14
15
16
17
18
19
20
21
下一页
公告