How to solve this problem

Правка ru2, от RetiredPlayer, 2020-08-04 00:14:16

Today I created this problem, idk maybe it exists somewhere

We have array of n numbers n <= 2e4, a[i] <= 1e6 And we have q queries q <= 2e4, 1 <= l <= r <= n

Initially we have subset with element a[l:r], we need to erase minimal number of elements from this subset so that gcd(subset) > 1 gcd of subset becomes bigger than 1

I have some idea but idk if it’s right

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
ru2 Русский RetiredPlayer 2020-08-04 00:14:16 20
ru1 Русский RetiredPlayer 2020-08-03 23:04:29 766 Первая редакция (опубликовано)