Xorry Queries

  • + 0 comments

    The definition of the problem is wrong.

    Definition says,

    sum(l...r) = p(l) + p(l+1) + ... + p(r)
    

    But the implementation works when,

    sumfunc(l...r) = p(l) + p(l+1) + ... + p(r-1)
    

    Here the interval [l,r) is left-closed,right-opened.