amit_pandit_15's blog

By amit_pandit_15, history, 3 years ago, In English

Hello everyone , I am getting time limit exceed in 1263E - Editor , I am using segment tree to find maximum prefix sum and minimum prefix sum , 158978146 is my submission to the problem.

Please help me in debugging my code.

Thanks in Advance :)

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

»
3 years ago, # |
  Vote: I like it -11 Vote: I do not like it

You should probably do problem which have difficulty close to your rating

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

    Yes I agree to your statement , but I was trying to do some segment tree problems and one of my friend gave me this question to try , I didn't saw rating of problem before solving because I had my rating and tags for unsolved problems hidden.

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

    You should probably write comments on platforms close to your environment.

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

Got AC by just changing the language to Cpp20(64) :(

link

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

    yes, it worked changing language to cpp20.

    Thankyou for helping me out. :)

    can you suggest any reason for this because I have no idea why it was not working in cpp17.

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

      Maybe it is because you use ll(int64) everywhere.

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

        Ohh yes, you are right changing 64 bit integer to 32 bit integer is working in cpp17.

        Thanks.