传送门 题目描述 分析 我们去维护每个区间内不能整除 x x x的个数 c n t cnt cnt x = = 0 x == 0 x==0 把这个区间内任意一个数修改为 x x x即可 x = = 1 x == 1 x==1 将不能整除 x x x的数修改为 x x x x > 1 x > 1 x>1 无法达到要求 代码 #pragma GCC optimize(3)#incl
Bash likes playing with arrays. He has an array a1, a2, ... an of n integers. He likes to guess the greatest common divisor (gcd) of different segments of the array. Of course, sometimes the guess