Problem 3525 · Hard

Find X Value of Array II

Each query overwrites one array value permanently, then fixes a start index and a target remainder x. Count the end positions, at or after the start, whose subarray product leaves remainder x when divided by k.

Open the interactive visualisation