摘要: 想了很久,才知道用线段树来做,实现也不算太复杂。#include<iostream>#include<cstdio>#include<cstring>using namespace std;#define SIZE 262145struct node{ int i,left,right,sum;};node vert[SIZE<<2];int treeNode;int build(int i,int left,int right){ int mid; vert[i].left=left; vert[i].right=right; vert[i]. 阅读全文
posted @ 2012-04-18 19:13 书山有路,学海无涯 阅读(360) 评论(0) 推荐(0) 编辑