自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 【Codevs1228】苹果树(dfs序+树状数组)

#include<cstdio> #include<iostream> #include<cstring> #include<algorithm> using namespace std; const int maxn=100010; int n,m,a1,a2,in[maxn],out[maxn],head[maxn],ncnt,cnt,c[maxn],vis[maxn]; struct edge

2016-05-30 11:57:52 428

原创 COJS.36求和问题

论树状数组与线段树的博(dui)弈(gang)动态的修改求和(zi)(cheng)万能的线段树(肯定不是我说的,但是和天勇勋押韵。。。)所以,题目来源:http://cojs.tk/cogs/problem/problem.php?pid=36 还有我的代码:#include<cstdio> #include<iostream> #include<algorithm> #include<cmath

2016-05-04 17:59:16 344

转载 [离散化]图形面积

题目来源:https://vijos.org/p/1056#include<bits/stdc++.h> using namespace std; const int maxn=100+10;int tot=1,n; struct data{ int x1,y1,x2,y2; bool read(){ scanf("%d%d%d%d",&x1,&y1,&x2,&y2)

2016-05-03 20:27:19 324

转载 字典树

const int maxnode = 4000 * 100 + 10; const int sigma_size = 26; // 字母表为全体小写字母的Trie struct Trie { int ch[maxnode][sigma_size]; int val[maxnode]; int sz; // 结点总数 void clear() { sz = 1; memset(c

2016-05-03 18:30:45 220

原创 洛谷P1908逆序对(离散化+树状数组)

题目来源:http://www.luogu.org/problem/show?pid=1908 搞来搞去,还是SYZOJ自带代码框最好用 #include #include #include #include using namespace std; const int maxn=40000+10; int n,c[maxn]; struct data{ long long v;

2016-05-03 12:46:06 513

转载 离散化(Matrix67)

什么是离散化?     如果说今年这时候OIBH问得最多的问题是二分图,那么去年这时候问得最多的算是离散化了。对于“什么是离散化”,搜索帖子你会发现有各种说法,比如“排序后处理”、“对坐标的近似处理”等等。哪个是对的呢?哪个都对。关键在于,这需要一些例子和不少的讲解才能完全解释清楚。     离散化是程序设计中一个非常常用的技巧,它可以有效的降低时间复杂度。其基本思想就是在众多可能的情况中

2016-05-03 12:44:28 742

转载 二叉索引树(树状数组)

//inline int lowbit(int x) { return x&(x^(x-1)); } inline int lowbit(int x) { return x&-x; } struct FenwickTree { int n; vector C; void resize(int n) { this->n = n; C.resize(n); } void clear

2016-05-02 11:48:15 341

原创 bzoj1050:[HAOI2006]旅行comf

题目来源:http://www.lydsy.com/JudgeOnline/problem.php?id=1050 话说我以后是不是也要把函数堆在一起了。。。 //得到hzwer大神的题解 #include #include #include using namespace std; #define INF 0x3fffffff int n,m,s,t; struct data{ in

2016-05-01 22:46:56 269

原创 高精

#include #include #include #include using namespace std; const int maxn=4000; struct BIGNUM{ int len,s[maxn]; BIGNUM(){memset(s,0,sizeof(s));len=1;} BIGNUM operator=(const char* num){ len=strlen

2016-04-30 14:03:38 223

原创 吐槽

话说只有我从SYZOJ上粘的代码才会自带代码框啊。。。。 在cojs上就完全不一样了。。。。。。。。。 %拜神犇lcy.....

2016-04-30 09:35:00 190

转载 不知道是什么(ting)(shuo)效率很高的代码

题目来源:http://www.luogu.org/problem/show?pid=2661 //%拜神犇tys #include #include #include using namespace std; const int maxn=200005; int vis[maxn];//这个点是第几次搜到的 int fa[maxn]; int dfn[maxn];//深度记录 int

2016-04-29 07:56:11 502 1

原创 最短路

迪杰斯克拉: #include #include #include #include #include using namespace std; #define maxn 100002 #define INF 100000000 struct e{

2016-04-28 10:47:54 263

原创 酱油记OfHAOI@)!^

无力吐槽。。。。 怎么说,有欢笑,有泪水吧,更多的是痛苦。 和许多神犇一样,我们敬爱的学长XTT没进队,真的是很可惜,也许竞赛就是这样,残酷的现实,突然感觉本HA省蒟蒻必在明年此时退役,残酷的事实。 啊,一个小惊喜是遇到了57大学霸(年级第一,语文百分制时他能考95,%%%)YFH,现在他在外语,引起了我很多童年时的回忆啊。 %%%各位大神%%% 十一中加油!

2016-04-28 08:15:52 260

原创 dch的新博客

我的新博客:致敬偶像余佳文

2016-04-26 21:06:24 327

空空如也

空空如也

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

TA关注的人

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