Problem 3006 · Medium

Find Beautiful Indices in the Given Array I

Find every start of a and keep it when some start of b lies within k positions; a direct scan checks each pair.

Open the interactive visualisation