自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

hychychyc

666

  • 博客(14)
  • 收藏
  • 关注

原创 字典树

#include<cstdio> #include<cstring> using namespace std; #define id(x) x-'a'; struct st{ int nex[26]; int f,t; }s[911999]; int tot=1; char st[199]; void insert(char ste[]) { int rt=0,len=str

2017-03-31 15:22:45 338 1

原创 HH的项链(莫队算法模版)

#include<cstdio> #include<iostream> #include<cmath> #include<algorithm> using namespace std; int n,m,s; int ans[999999]; struct st{ int l,r,h,t; }p[999999]; int f[999999],a[999999]; int cmp(const s

2017-03-28 18:10:13 274

原创 区间(差分约束模板)

#include<cstdio> #include<cstring> #include<iostream> using namespace std; const int M=9999999; int n,m,flag; int vis[M],d[M],dis[M],f[M]; int nex[M],tot,to[M],head[M],cos[M]; void add(int x,int y,int

2017-03-24 15:30:24 279

原创 关系运算图模板

#include<cstdio> #include<cstring> #include<iostream> using namespace std; const int M=999999; int n,m,f[M],flag; int vis[M],d[M],dis[M]; int nex[M],tot,to[M],head[M],cos[M]; void add(int x,int y,int z

2017-03-24 14:07:20 343

原创 割点(模板)

#include<cstdio> #include<iostream> using namespace std; int m,n; int a[1999][1999]; int t; int root; int dfn[999]; int low[999]; int flag[9999]; int dfs(int x,int f) { int c=0; dfn[x]=++t;

2017-03-19 09:20:22 254

原创 黑匣子

维护一个大根堆,维护一个小根堆,大根堆有k个数,堆首就是第k大的,不会写堆,这里用优先队列来实现#include<cstdio> #include<iostream> #include<queue> using namespace std; int n,m; int k=0; long long a[299999]; int f[299999]; priority_queue <long long>

2017-03-17 15:59:33 230

原创 挤牛奶

桶排的思想,数据太水,过了,还有正解排序维护一个区间,时刻更新,所以要赋初值,找到n+1否则不更新#include<iostream> #include<cstring> using namespace std; int f[2000000]; int max1=0,max2=0,max3=-9999999; int n; int flag,flag2; int main() { scanf

2017-03-17 15:00:22 504

原创 上白泽慧音

裸的tarjan。可是我有个问题 不知道是数据太水还是我理解错了,我用一个没比字典序的程序竟然AC了,(这说明数据没有多种最大的的,我认为字典序输出是输出字典序小的 ,不是吗? )下面是加字典序的代码 #include<cstdio> #include<iostream> using namespace std; int n,m; const int M=200000; int head[M],t

2017-03-08 22:44:23 292

原创 lca最小公共祖先祖先

#include <cstdio> #include<cstring> using namespace std; int du[99999]; int flag[2999]; double dis[2099]; int w[2989][2999]; int n,m; int main() { int x,y,z; scanf("%d%d",&n,&m); memset(dis,

2017-03-05 11:18:49 327

原创 最小花费

简单的spfa。。 但我就纳闷了,为啥数组模拟邻接表却tle#include <cstdio> #include<cstring> using namespace std; int du[99999]; int flag[2999]; double dis[2099]; int w[2989][2999]; int n,m; int main() { int x,y,z; scanf

2017-03-05 11:06:10 293

原创 牛的旅行(标程)

#include<cstdio> #include<iostream> #include<cmath> using namespace std; int n,m; double w[999]; double x[999],y[999]; double dis[999][999]; void floy()//floyed { for(int k=1;k<=n;k++) for(int i

2017-03-05 08:50:20 325

原创 骑马修栅栏

#include<cstdio> using namespace std; int a[999][999]; int n,m; int z=1; int b[9999]; int t=0; int du[9999]; void dfs(int x) { int i; for(i=1;i<=500;i++) { if(a[x][i]!=0) {

2017-03-03 17:05:18 415

原创 封锁阳光大学

二分图染色#include<cstdio> #include<vector> #include<cstring> using namespace std; int n,m; int min1=99999999; vector < int > a[99999]; int ans; int ans1; int f[99999]; int flag; int dfs(int x) { if(fla

2017-03-03 15:45:16 149

原创 爱在心中

#include<cstdio> #include<vector> using namespace std; int top=0; int dfn[99999]; int low[99999]; int colour[99999]; int dfn_num; int ans; int colour_num; int vis[99999]; int strak[99999]; int f[1999][

2017-03-01 16:05:38 259

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除