摘要:
想了很久,才知道用线段树来做,实现也不算太复杂。#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]. 阅读全文