jarvis307's blog

By jarvis307, history, 9 months ago, In English

Hello Codeforces!!

I was doing the question 1242B - 0-1 MST. Similar type of questions are 920E - Connected Components? 190E - Counter Attack.

In short, these questions ask you to calculate the number of connected components in the compliment of graph.

I have read the editorials but I am a little stuck with the problem.

I would be grateful if someone could help me out with this.

TIA

Read more »

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

By jarvis307, history, 10 months ago, In English

Hello Codeforces!!

I was attempting 1288E - Messenger Simulator and I am getting TLE on test case 9.

I tried the first and the straight forward approach given in the tutorial i.e. to use merge segment trees for finding the number of distinct elements in a subarray.

I would be grateful if someone could take out 5 mins to look at this code 84970607.

TIA!!

Read more »

 
 
 
 
  • Vote: I like it
  • 0
  • Vote: I do not like it

By jarvis307, history, 10 months ago, In English

Hello codeforces!!

First of all, I would like to say thanks to this whole community for providing contests, tons of great blogs, and useful comments (sharing elegant solutions different from editorials).

I started coding from the month of January dedicatedly (though the account was created many years ago xD) and I think I improved a lot because of this awesome community. I gave many contests, solved many problems with difficulty higher than my rating, gave some virtual contests, and solved two to three ladders.

I am facing a problem of deciding how to proceed further. Though I know to grow one should do more difficult things than they are capable of doing at the current stage, and thus I am currently solving questions in the range of 1900 to 2400. Now I am in the dilemma that I should narrow down the range to somewhat say 1900 to 2000 as sometimes questions with difficulty 2400 take around 1 to 1.5 days.

It would be great if people can share their valuable experiences regarding this.

TIA!

Read more »

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

By jarvis307, history, 11 months ago, In English

Hello Codeforces!!

I have many times came across scanline algorithm in tutorials but don't know about that. I googled it and the only thing I came across was the 'Polygon filling algorithms'.

I would be grateful if someone could guide how this algorithm is used in competitive programming questions or provide with some useful links

TIA!

Read more »

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