Royboy01's blog

By Royboy01, history, 2 years ago, In English

Can someone tell me why my solution got tle. As par I know deque takes O(1) for insertion and deletion from front and back.

184575519

  • Vote: I like it
  • +3
  • Vote: I do not like it

»
2 years ago, # |
  Vote: I like it +3 Vote: I do not like it
  • »
    »
    2 years ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    Thanks. But why it happened? Also should I use cerr further?

    • »
      »
      »
      2 years ago, # ^ |
        Vote: I like it +3 Vote: I do not like it

      Because cerr is slow, use it only when you write small amount of data.