• + 1 comment

    I got 150 using 26 data structures, each of them got the update value in O(1) because of the constraint (m<=101), you can generate all posible remainders to each of the posibles values of m, and then you find the period in no more than m^2 . But when you read the editorial, they use binpow to get all the updates that cost a lot, but they solve the problem with just 5 data structures... nice problem!

    • + 1 comment

      That is very impressive! If it is allowed to ask these without referring to the author's approach, how much peak memory usage with the DS in your solution,max user time, and how many tree traversals are you making?

      • + 0 comments

        for complete solution in python java c++ and c programming search for programs.programmingoneonone.com on google