Please read the new rule regarding the restriction on the use of AI tools. ×

blablabla1803's blog

By blablabla1803, history, 2 hours ago, In English

In the last div2 B problem, 283258843 isnt this submission O(nlogn) ?? If it is so then why is it getting TLEd :(. Otherwise what is the correct complexity?

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

»
2 hours ago, # |
  Vote: I like it 0 Vote: I do not like it

isn't it O(T(n + q))?

  • »
    »
    2 hours ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    it is O(n + nlogn + qlogn) which is quite efficient

    • »
      »
      »
      23 minutes ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Nah,, It is O(n+nlogn+q).

      • »
        »
        »
        »
        12 minutes ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        i am accessing map for every query that adds logn

»
2 hours ago, # |
  Vote: I like it +1 Vote: I do not like it

had the same issue declare k as long long

»
2 hours ago, # |
  Vote: I like it 0 Vote: I do not like it

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

»
15 minutes ago, # |
  Vote: I like it 0 Vote: I do not like it

I've just changed endl to '\n' and the type of K to long long and it got accepted 283362761