摘要: #includeusing namespace std;const int N=5000+5;int a[N];struct Tree{ int left,right,sum;}tree[4*N+10];void build(int id,int l,int r){ tr... 阅读全文
posted @ 2015-09-28 19:40 xryz 阅读(122) 评论(0) 推荐(0) 编辑
摘要: #includeusing namespace std;typedef int ll;const int N=200000+5;int a[N],ans;struct Tree{ int left,right; ll maxv;}tree[4*N+10];//建立线段树,... 阅读全文
posted @ 2015-09-28 18:53 xryz 阅读(138) 评论(0) 推荐(0) 编辑