把数组放在struct里会不会像放在main函数里那样炸,或者变慢
比如这样:
struct Bit{ int c[M]; void add(int x,int y){ for(;x<=n;x+=x&-x)c[x]+=y; } void ask(int x){ int res=0;for(;x;x-=x&-x)res+=c[x];return res; } };