2016年9月17日
摘要: int read(){ int sum=0; char ch=getchar(),last=' '; while (ch'9'){ last=ch;ch=getchar(); } while (ch>='0'&&ch<='9'){ sum=sum*10+ch-'0'; ch=getchar(); } ... 阅读全文
posted @ 2016-09-17 20:08 Absolutezero 阅读(272) 评论(0) 推荐(0)
摘要: 单一标记线段树 1 #include<cstdio> 2 #include<cstring> 3 #define lson i<<1,l,mid 4 #define rson i<<1|1,mid+1,r 5 using namespace std; 6 const int N=400020; 7 阅读全文
posted @ 2016-09-17 19:47 Absolutezero 阅读(172) 评论(0) 推荐(0)
摘要: 线段树模板题 1 #include<cstdio> 2 #include<cstring> 3 using namespace std; 4 const int N=50010; 5 int t,n,h[N],sum[4*N]; 6 char ch[20]; 7 void update(int),b 阅读全文
posted @ 2016-09-17 19:44 Absolutezero 阅读(381) 评论(0) 推荐(0)