Elements in Array After Removing and Replacing Elements
Work out the array at any second of a repeating remove-then-restore cycle, then read the index each query asks for.
Work out the array at any second of a repeating remove-then-restore cycle, then read the index each query asks for.