20181017专题

题目B-Competition - 20181017

题目 Vova's house is an array consisting of nn elements (yeah, this is the first problem, I think, where someone lives in the array). There are heaters in some positions of the array. The ii-th elemen

题目A-Competition - 20181017

题目: https://vjudge.net/contest/262776#problem/A 水题,题意:从1-n,能被v整除的点上有灯笼,一列火车从点 l - 点 r,问能看到多少灯笼。 思路:开始没注意数据范围 ,直接以v为循环间隔,落入l-r区间内的舍去,其他计数。然后超时了。换思路,直接用“x”除以间隔v,得到1-x中灯的个数,相减几次可得所有可见的灯笼。//注意特判边缘覆盖情况。