adityagamer's blog

By adityagamer, 2 years ago, In English

This is my solution: Solution(Not visible) Check my code below

For question : Question

It is giving TLE on Test 3.

My code

My solution is in O(t.log(p)).

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

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

you solution can't open to other people so can you write your code in spoiler to check it?

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

add this line (ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);) to your code and see the result it will fast your input

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

    cout.tie(0) does nothing

    • »
      »
      »
      2 years ago, # ^ |
      Rev. 5   Vote: I like it 0 Vote: I do not like it

      i just add the previous line and it give wrong answer instead of TLE

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

    I have already done that