自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 spoj cot Count on a tree

树上k大值 , 主席树模板题#include #include #include #include #include using namespace std;int const M = 200010;struct edge { int v,next; }edge[M*2];int num_edge,num_tree,top ,head[M] , father[M*5];

2013-10-29 19:43:10 634

原创 bzoj 3261: 最大异或和

假设a[i] = a[1] ^ a[2] ^ ... ^ a[i];那么对于区间l,r ans= max(a[i] ^ (a[N] ^ x) )(l - 1 #include #include #include #include using namespace std;const int M = 1010100;const int SZ = 26;struct node {

2013-10-25 22:00:23 737

原创 poj 3580 经典splay树

/*这个写得有点吐血,,,,,,,,,不过确实经典 ,,,,,*/#include #include #include #include #define keyTree (ch[ ch[root][1] ][0])int const inf = 0x3f3f3f3f;using namespace std;const in

2013-10-23 18:31:03 624

原创 poj 3481 slpay 基础题

#include #include #include #include #define keyTree (ch[ ch[root][1] ][0])const int maxn = 1222222;const int inf = 0x3f3f3f3f;struct node { int id,priority;};struct SplayTree{ int sz[maxn];

2013-10-23 18:27:56 680

原创 SPOJ DQUERY 入门主席树

#include #include #include #include #include #include using namespace std;int const M = 50000+99;struct node { int left,right; int val ;}tree[Mint root[

2013-10-23 18:26:37 755

原创 bzoj 1901 动态求k大值

/**************************************************************    Problem: 1901    User: wocha    Language: C++    Result: Accepted    Time:444 ms    Memory:29820

2013-10-23 18:13:25 506

原创 zoj 3420 纯bfs

/*这个写的有点sb 本来可以开个数组的,会少很多代码的 !!,不过还好1A !!*/#include #include #include #include #include using namespace std;int vis[9][9][9][9];int const M = 908;struct node33 {int l,d,r,u;

2013-10-23 18:36:09 685

空空如也

空空如也

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

TA关注的人

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