Sliding Window Or
The bitwise or 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 or 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 ors.
Constraints
Example
Input:
8 5 3 7 1 11
Output:
4
Explanation: The input array is . The windows are , , and , and their ors are , , and . Thus, the answer is .
Statement © the CSES Problem Set. View the original
The specification is at TalosEval/Problems/CSES/SlidingWindowOr/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 | 90,957,071,140 | talos-prover · gpt-6-astra | talos-prover · gpt-6-astra | 2026-09-25 14:46 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.