cin >> n >> m >> k; blo = sqrt(n); for (int i = 1; i <= n; ++i) cin >> a[i], s[i] = s[i - 1] ^ a[i]; for (int i = 1; i <= m; ++i) cin >> Q[i].l >> Q[i].r, Q[i].id = i, --Q[i].l; sort(Q + 1, Q + m + 1); int l = Q[1].l, r = l - 1; for (int i = 1; i <= m; ++i) { while (r < Q[i].r) add(s[++r]); while (l > Q[i].l) add(s[--l]); while (r > Q[i].r) del(s[r--]); while (l < Q[i].l) del(s[l++]); Ans[Q[i].id] = ans; } for (int i = 1; i <= m; ++i) cout << Ans[i] << "\n"; return0; }