hey guys, i was chatting with my dudes, and then we found an interesting problem, plz give me some ideas, cheers.↵
↵
give u n numbers represented as ai(can be positive or negative),u have todeal with m operations↵
↵
1. add x y c, add c to [x,y]↵
↵
2. times x y c, times c to [x,y] ↵
↵
3. divide x y c, make everything in [x,y] divided by c, ignore the digits after decimal point↵
↵
4. ask x y, ask the sum in [x,y]↵
↵
5. ask how many times in [x,y] such that the prefix sum of i is negative↵
↵
n,m smaller than 1e5, other numbers are integers
↵
give u n numbers represented as ai(can be positive or negative),u have todeal with m operations↵
↵
1. add x y c, add c to [x,y]↵
↵
2. times x y c, times c to [x,y] ↵
↵
3. divide x y c, make everything in [x,y] divided by c, ignore the digits after decimal point↵
↵
4. ask x y, ask the sum in [x,y]↵
↵
5. ask how many times in [x,y] such that the prefix sum of i is negative↵
↵
n,m smaller than 1e5, other numbers are integers