题目地址:24道CF的DIv2 CD题有兴趣可以做一下. ACM思维题训练集合 Bajtek is learning to skate on ice. He's a beginner, so his only mode of transportation is pushing off from a snow drift to the north, east, south or west and sliding until he lands in another snow drift. He ha…
Jam's math problem Submit Status Practice HDU 5615 Description Jam has a math problem. He just learned factorization. He is trying to factorize into the form of . He could only solve the problem in which p,q,m,k are positive numbers. Please hel…
D. Bash and a Tough Math Puzzle http://codeforces.com/contest/914/problem/D 题意: 单点修改,每次询问一段l~r区间能否去掉小于等于1个数,使gcd为x 分析: 线段树. 线段树二分.如果一边的gcd不是x,那么递归这一边,找到这个位置为止,计算这样的位置的个数. 代码: #include<cstdio> #include<algorithm> #include<cstring> #includ…