Problem 2344 · Hard

Minimum Deletions to Make Array Divisible

Keep the smallest value that divides the gcd of the targets, and delete everything smaller than it.

Open the interactive visualisation