反转时,不光在打上懒标记时是取反,下传懒标记时儿子节点也是取反。
wrong code:
if(tr[now].other) tr[now].other=0; tr[now*2].other=1,tr[now*2+1].other=1;
AC code:
if(tr[now].other){ tr[now].other=0; tr[now*2].other^=1,tr[now*2+1].other^=1;