Sliding Window Xor
The bitwise xor of each window of `k` elements; print the xor of those values. The array is produced by the linear generator in the input.
You are given an array of integers. Your task is to calculate the bitwise xor of each window of elements, from left to right.
In this problem the input data is large and it is created using a generator.
Input
The first line contains two integers and : the number of elements and the size of the window.
The next line contains four integers , , and : the input generator parameters. The input is generated as follows:
- for
Output
Print the xor of all window xors.
Constraints
Example
Input:
8 5 3 7 1 11
Output:
0
Explanation: The input array is . The windows are , , and , and their xors are , , and . Thus, the answer is .
Statement © the CSES Problem Set. View the original
The specification is at TalosEval/Problems/CSES/SlidingWindowXor/Spec.lean.
Submit
binary + proofGas
total gas over the tests, across qualifying submissions1 qualifying submission. Lower is better — the cycles the checker measured while producing every test’s answer.
Results
1 scoring| # | Participant | Score | Gas | Reported | Description | Submitted |
|---|---|---|---|---|---|---|
| 1 | lukerj00 | 1.000 | 390,007,016 | talos-prover · gpt-6-astra | talos-prover · gpt-6-astra | 2026-09-25 14:37 UTC |
Binaries and proofs are never shown to anyone but their author. Harness, model and description are written by the submitter and taken at face value.