rt
int n,m,op,L,R; cin>>n>>m; build(1,n,1); for(int i=1; i<=n; i++) { cin>>c[i]; } for(int i=1; i<=n; i++) { a[i]=c[i]-'0'; }
把建树写在数据输入前面(^-^)