摘要:
首先我们看到题目其实挺懵的。 对于(a1 + a2) ^ (a1 + a3) ^ ... ^ (an-1 + an),感觉除了暴力一点办法都没有。 其实我们可以看到。所有的括号外面其实都是异或符号。那么我们最后求的是一个异或的值。 那么[0 - 1e7]异或的值必然不会超过2e7。于是我们可以考虑按 阅读全文
posted @ 2021-08-11 15:06
ViKyanite
阅读(101)
评论(0)
推荐(0)
摘要:
这道题可以直接枚举第一个格子状态,之后check即可。因为方案最多只有两种 当然也可以用dp 以下是dp做法: #include <bits/stdc++.h> using namespace std; typedef long long ll; const int maxn = 2e6 + 10; 阅读全文
posted @ 2021-08-11 14:56
ViKyanite
阅读(43)
评论(0)
推荐(0)

浙公网安备 33010602011771号