记得比较A,B并交换,还有不要像我一样还没读入玩ABC就getline吞换行
附上GG代码
int main(){
cin >>l>>T>>o;
getline (cin,kong);
treebuild(root);
while (o--){
scanf ("%c%d%d",&op,&A,&B);
getline (cin,kong);
if (op=='C'){
scanf ("%d",&C);
treechange (root,A,B,C);
}else {
printf ("%d\n",popcount(treequery(root,A,B)));
}
}
return 0;
}