Problem 2946 · Easy

Matrix Similarity After Cyclic Shifts

Shift even rows right and odd rows left by k, then check whether each row returns to where it started.

Open the interactive visualisation