摘要:
#include<iostream>#include<cstdio>#include<cstring>using namespace std;const int MAX=100000;int svalue;struct node{int left,right,cover;};node tree[MAX*3];bool used[31];void built(int L,int R,int id)//建树{tree[id].cover=1;//初始化tree[id].left=L;tree[id].right=R;if(L<R){int mid=(L+R 阅读全文
摘要:
#include "iostream"#include "string"#define Max 50005using namespace std;int N,sum;struct node_tree{int left;int right;int num;};node_tree node[Max*3];void build(int i,int l,int r)//建树{node[i].left=l;node[i].right=r;node[i].num=0;if (l<r){int mid=(l+r)>>1;build(2*i,l,mid 阅读全文