- 博客(6)
- 收藏
- 关注
原创 链式前向星
struct edge{ int to,nxt;}e[maxn<<1];void add_edge(int u,int v){ e[cnt].to=v; e[cnt].nxt=head[u]; head[u]=cnt++;}
2019-04-30 16:33:05
182
转载 中国剩余定理
转载https://www.cnblogs.com/walker01/archive/2010/01/23/1654880.html题目待做
2019-04-14 23:47:31
136
转载 扩展欧几里得(转载)
https://www.cnblogs.com/hadilo/p/5914302.htmlhttps://blog.csdn.net/hffhjh111/article/details/81063458扩展欧几里得可用于求线性同余方程(ax = b(mod n))以及解不定方程(使用不将a与b转为互质的方法)。习题待补充........
2019-04-14 22:08:40
114
原创 线段树入门(代码模板)
#include<cstdio>using namespace std;int n,p,a,b,m,x,y,ans;struct node{ int l,r,w,f;}tree[400001];inline void build(int k,int ll,int rr)//建树 { tree[k].l=ll,tree[k].r=rr; if(tr...
2019-04-03 20:12:24
126
原创 背包九讲伪代码总结
参考链接https://www.cnblogs.com/jbelial/articles/2116074.htmlN件物品, 背包容量为V。第i件物品的费用是c[i],价值是w[i]。针对题目要求, 求价值总和最大的方法。1.01背包(每个物品个数为1)for(int i = 1; i <= N; i++) for(int v = V; v >=0; v--) ...
2019-04-02 23:19:05
3124
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人