Блог пользователя corpulent

Автор corpulent, 4 года назад, По-английски

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.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +16
  • Проголосовать: не нравится

Автор corpulent, история, 4 года назад, По-английски

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 :)

Полный текст и комментарии »

  • Проголосовать: нравится
  • -17
  • Проголосовать: не нравится

Автор corpulent, история, 4 года назад, По-английски

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

ThankYou

Полный текст и комментарии »

  • Проголосовать: нравится
  • -10
  • Проголосовать: не нравится