摘要:
题目 "传送门" 思路 对条件进行一下变形 如果对于$i,j$两个人,如果$i$选择$x_i$,则必定有关系 $x_i+y_j include include using namespace std; define int long long int n,m; struct node { int x 阅读全文
posted @ 2020-01-31 18:49
loney_s
阅读(183)
评论(0)
推荐(0)
摘要:
题目 "传送门" 思路 正难则反,全集是很好求的,即为$\frac{n (n+1)}{2}$,想要异或不为0的尽可能的多,即异或为0的尽可能的少 对于所有的区间$l,r$,可以用前缀和$s$来表示,$s_r ~xor~s_{l 1}$, 之后我们考虑$xor$的性质,只有当两个数相同时,异或值才为0 阅读全文
posted @ 2020-01-31 17:29
loney_s
阅读(122)
评论(0)
推荐(0)

浙公网安备 33010602011771号