警示,全wa
  • 板块P1558 色板游戏
  • 楼主ccxswl
  • 当前回复0
  • 已保存回复0
  • 发布时间2023/8/13 10:02
  • 上次更新2023/11/3 04:09:10
查看原帖
警示,全wa
726992
ccxswl楼主2023/8/13 10:02

lazetag直接传递,不用2的多少次方

void make(Tree &tmp, int V) {
	tmp.v = 1 << (V - 1);
	tmp.tg = V;
}
void down(int cur) {
	if (!t[cur].tg) return;
	make(t[ls], t[cur].tg);
	make(t[rs], t[cur].tg);
	t[cur].tg = 0;
}
2023/8/13 10:02
加载中...