sdKrhMn286's blog

By sdKrhMn286, history, 9 months ago, In English

From codeforces EDU I solved THIS segment tree related problem and got accepted, I found THIS on CSES which is very similar to the problem I solved (on codeforces EDU). I submitted exactly same code for both of them (only thing I changed is removed first type query). On codeforces it is accepted and CSES gives runtime error.

ACCEPTED CODE on THIS PROBLEM on codeforces.

RUNTIME ERROR on THIS PROBLEM on CSES.

Can someone spot the issue and tell me what to do to resolve that? THANKS IN ADVANCE...

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

»
9 months ago, # |
  Vote: I like it +12 Vote: I do not like it

on CSES n <= 2e5

  • »
    »
    9 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Changing the value of N from 1e5 to 2e5 worked, thanks

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

change 1e5 to 2e5 hehehehehe