摘要: 没想到竟然能一次AC,而且只花了20分钟不到。第一道线段树的题了,纪念一下。 考察线段树的基本操作:建树,区间最值查询和更新操作.View Code #include <iostream>using namespace std;const int MAX = 200005;struct Tree{ int left; int right; int score;}tr[MAX*3];int n,m,s[MAX],a,b;char cmd;int max(int x,int y){ if(x > y) return x; else return y;}void build(int 阅读全文
posted @ 2011-04-08 23:49 c++fans 阅读(323) 评论(0) 推荐(0) 编辑