Problem 2680 · Medium
Spend all k doublings on one element, trying each element with prefix and suffix OR tables.
Open the interactive visualisation