sdKrhMn286's blog

By sdKrhMn286, history, 12 months ago, In English

I wrote this solution for this problem and getting TLE on last test case. Can someone tell me how I can make my solution more optimal with or without DP .

Thanks in advance :);

Full text and comments »

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

By sdKrhMn286, history, 13 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...

Full text and comments »

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