this_ability's blog

By this_ability, history, 8 months ago, In English

Salary Queries — My solutionI am still stuck at Salary Queries. Although acc to me I have followed your approach to the answer only, but I am getting TLE on CSES with some test cases getting accepted. I have tried to debug my code but I still feel it should have a T.C. less than 1e8. Can anybody help? (I have used map as well but tle)

  • Vote: I like it
  • 0
  • Vote: I do not like it

»
8 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by this_ability (previous revision, new revision, compare).

»
8 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

maybe the query should be

if (l <= tl && r >= tr) {
    return t[v];
}