摘要:
#include#include#include#include#include#include#define lson l,m,rts;set::iterator itr;void pushUp(int rt,int m){ rsum[rt]=rsum[rt>1))) lsum... 阅读全文
摘要:
先保存一段错误的代码#include#include#include#include#define lson l,m,rt>1; build(lson); build(rson); pushUp(rt);}void update(int w,int L,int R,int l,in... 阅读全文
摘要:
#include#include#include#include#include#include#define lson r,m,rt>1)) lsum[rt]=lsum[rt]+lsum[rt>1) rsum[rt]=rsum[rt]+rsum[rt>1; bui... 阅读全文
摘要:
做完这道题突然就感觉自己脑子是不是已经秀逗了,tle到死后才想起来找规律, 就是求排列数的题目,按插入点对状态进行分类,可以暴力tle。。。#include#include#includeusing namespace std;int main(){ int a[1111][1111];... 阅读全文
摘要:
一两个月没写代码的确是手生的厉害,debug的好艰辛,,不过看到accept时的那种满足感真的就是爽#include#include#include#include#define lson l,m,rt>1)&&lnum[rtrnum[rt>1&&lnum[rtrnum[rt>1; build... 阅读全文
摘要:
对照着notonlysuccess大牛的代码写的#include#include#include#include#define lson l,m,rt>1; build(lson); build(rson);}void pushUp(int rt,int m){ lsum[rt]=... 阅读全文
摘要:
第一次没想到用位运算,不出意料的T了,,,PS:在床上呆了接近两个月后,我胡汉三又杀回来刷题啦~~#include#include#include#include#define lson l,m,rt=L&&R>=r) { sum[rt]=c; col[rt]=1r... 阅读全文
摘要:
参考自http://www.notonlysuccess.com/index.php/segment-tree-complete/#include#include#include#include#define lson l,m,rt>1)); sum[rt>1); col... 阅读全文
摘要:
#include#include#include#define lson l,m,rt>1; build(lson); build(rson);}int query(int d,int l,int r,int rt){ int ret=-1; if(l==r) { ... 阅读全文
摘要:
http://www.notonlysuccess.com/index.php/segment-tree-complete/#include#include#include#include#define lson l,m,rt>1; build(lson); build(rson);}v... 阅读全文