Ask AI
Open a hint-first prompt in a new AI chat. Grok may ask you to confirm before sending.
Open Claude Desktoparrays · cyclic · sliding-window
The organizer’s problem statement is available at the official source link.
cyclic table
Rotate one row against a fixed row
For each cyclic shift of the second row, the table score is the maximum column sum. Output one score for every shift.
| Rotation k | Column sums | Output |
|---|---|---|
| k = 1..N | A[i] + B[(i+k-1) mod N] | max column sum for this k |
| all N rotations | one score per rotation | output all N scores |
- 1
Form each rotation
The fixed first row is paired with each of the N cyclic rotations of the second row. - 2
Score that table
For one rotation, add the two values in each column and take the largest column sum. - 3
Report all rotations
Output the score for every rotation in its prescribed order; do not maximize across rotations.
Tools
1
2
3
4
5
6
7
8
9
10
11
12
Draft saved locally
|12 lines, 156 charsRun output
Run your code to see output.