思路是xor有性质a ^ b ^b =a; 所以统计前缀和是否出现过 #include<bits/stdc++.h> using namespace std; typedef long long ll; map <int, bool> mp; int n, t, q, ans; int main() { ans = 0; scanf("%d", &n); mp[0] = true; while (n--) { scanf("%d", &t); q ^= t; if (mp....