关于struct
  • 板块灌水区
  • 楼主一架飞机
  • 当前回复5
  • 已保存回复5
  • 发布时间2021/10/21 16:09
  • 上次更新2023/11/4 03:03:36
查看原帖
关于struct
151712
一架飞机楼主2021/10/21 16:09

把数组放在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;
	}
};
2021/10/21 16:09
加载中...