Fork me on GitHub

随笔分类 -  c++

摘要:https://www.luogu.org/problem/show?pid=1206#sub#include#include#include#include#include#include#include using namespace std;int B,a[1000],b[1... 阅读全文
posted @ 2017-03-15 18:04 primes 阅读(214) 评论(0) 推荐(0)
摘要:P3372#include #include#include#include#include#define MAXN 200000#define LL long longusing namespace std;struct H{ LL addi,sum,l,r,len;}st... 阅读全文
posted @ 2016-12-30 14:08 primes 阅读(228) 评论(0) 推荐(0)
摘要:题见洛谷 一节课。。。#include#include#include#include#include#define MAXN 200000 using namespace std;int a0[MAXN+5],st[MAXN*4+5]; //四倍void build(int o,... 阅读全文
posted @ 2016-12-23 16:46 primes 阅读(174) 评论(0) 推荐(0)
摘要:n个数,m次操作 若a==1,求区间b-c最大值 若a==2,将a[ b ]改为c#include#include#include#include#include#define MAXN 200000 using namespace std;int a[MAXN+5],st[MAX... 阅读全文
posted @ 2016-12-23 15:53 primes 阅读(223) 评论(0) 推荐(0)
摘要:线段树模板//①建树 const int MAXM=50000; //定义 MAXM 为线段最大长度 int a[MAXM+5],st[(MAXM>1); // m 为中间点,左儿子结点为 [l,m] ,右儿子结点为 [m+1,r]; ... 阅读全文
posted @ 2016-12-23 14:40 primes 阅读(113) 评论(0) 推荐(0)