见博客https://www.cnblogs.com/zwfymqz/p/8588693.html 题解链接https://blog.csdn.net/ripped/article/details/70543595 本题lazy标记设为[change,add]当一个区间向下传递lazy标记时,由于change的优先级高于add,即会影响原有的add标记,所以将change先下传,同时清空子区间原有的add标记,然后再下传add标记 遇到乘法加法复合运算时同理,lazy标记设为[mul,add]当…
An easy problem C Time Limit: 4000/2000MS (Java/Others) Memory Limit: 65535/65535KB (Java/Others) Problem Description N个数排成一列,有三种操作.1.给一段区间内的每个数乘上一个非负整数.2.给一段区间内的每个数加上一个非负整数.3.询问一段区间的和模上P的值. Input 第一行两个整数N(1≤N≤100000)表示数的个数,P(1≤P≤1000000000)表示模的值.接下来…
转载请注明出处:http://blog.csdn.net/u012860063 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1698 Problem Description In the game of DotA, Pudge's meat hook is actually the most horrible thing for most of the heroes. The hook is made up of several consecut…
I - Transformation Yuanfang is puzzled with the question below: There are n integers, a 1, a 2, …, a n. The initial values of them are 0. There are four kinds of operations. Operation 1: Add c to each number between a x and a y inclusive. In other wo…
https://ac.nowcoder.com/acm/contest/907/C 链接:https://ac.nowcoder.com/acm/contest/907/C来源:牛客网 题目描述 Rabbit得到了一个长度为N的数列(数列编号从0到N−1).数列中每个数vali满足1<=vali<=C. 初始时数列中每个数均为1,现在Rabbit要对这个数列进行Q次操作,每次操作给出四个数:X Y A B,首先查询数列中值为X的个数P,然后计算出L,R: L=(A+(P+B)2)mod N R…
1798: [Ahoi2009]Seq 维护序列seq Time Limit: 30 Sec  Memory Limit: 64 MBSubmit: 7773  Solved: 2792[Submit][Status][Discuss] Description 老师交给小可可一个维护数列的任务,现在小可可希望你来帮他完成. 有长为N的数列,不妨设为a1,a2,…,aN .有如下三种操作形式: (1)把数列中的一段数全部乘一个值; (2)把数列中的一段数全部加一个值; (3)询问数列中的一段数的和…
Color the ball Time Limit: 9000/3000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 7941    Accepted Submission(s): 4070 Problem Description N个气球排成一排,从左到右依次编号为1,2,3....N.每次给定2个整数a b(a <= b),lele便为骑上他的“小飞鸽"牌电动车从气球…
To the moonTime Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hust.edu.cn/vjudge/contest/view.action?cid=88748#problem/I Description To The Moon is a independent game released in November 2011, it is a role-playing adventure game powered by RPG…
A Simple Problem with Integers   Description You have N integers, A1, A2, ... , AN. You need to deal with two kinds of operations. One type of operation is to add some given number to each number in a given interval. The other is to ask for the sum o…
A Corrupt Mayor's Performance Art Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 100000/100000 K (Java/Others) Total Submission(s): 1905    Accepted Submission(s): 668 Problem Description Corrupt governors always find ways to get dirty money…