做法? 开题时没思路,想着打表看看能不能找规律:哪些区间异或起来能得到 $0$?于是有了以下代码:
:::info[打表代码]
#include <bits/stdc++.h> #define ll long long #define str string #define db double using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr), cout.tie(nullptr); // 枚举右端点 for (ll i = 1; i <= 30; ++i) { ll …