corpulent's blog

By corpulent, 15 months ago, In English

This is in relation with the problem Special Tree from April Lunchtime 2021. Problem Link.

I used multisource BFS/Dijkstra to solve the problem in O(NlogN). Here are the two submissions I made.

  1. TLE Solution.

  2. Accepted Solution.

The only difference between TLE solution and Accepted Solution is that, in TLE solution I added two extra sets (declared at line 96 and 97, updated at line 102 and 106), which I thought would be useful ahead in the program, but were never used. Whereas in the Accepted solution I removed those two sets. This is the only difference.

The max length of those two sets is N and it would create a difference of NlogN only, which is well under limits.

Is adding elements to a set that much costly ? I think I am missing out something here.

Read more »

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

By corpulent, history, 18 months ago, In English

Dear Codeforces Community,

I am not new to competitive programming but my skills are. I did basic CP 5-6 months back and left. But now I have seen one of my friends who literally blew up my college with his results. During school I used to like coding a lot, that was basic I know. But now I feel upsurge of inspiration to lets do something productive.

For this I need you guys to help me. I want to know if there exists a set of problems which I can solve to increase my ratings. I am currently doing CSES, but I found it mostly confined to interviews level. Basically what I need is proper guidance and problems.

Please don't judge me of my way to prepare, instead provide a better alternative or roadmap to increase my skills.

Brainless Idiot :)

Read more »

  • Vote: I like it
  • -17
  • Vote: I do not like it

By corpulent, history, 2 years ago, In English

I have to perform segmenteed seive. This is my code. It shows segmented fault error, please tell the correction. My Code


Read more »

  • Vote: I like it
  • -10
  • Vote: I do not like it