Codeforces celebrates 10 years! We are pleased to announce the crowdfunding-campaign. Congratulate us by the link ×

compcodingisnorealskill's blog

By compcodingisnorealskill, history, 5 months ago, In English,

Hi fellow coder!

My friends and I usually agree on many topics but are have different views on how should one approach learning in Competitive programming.

My first friend says : " Solve virtual contests daily and you will learn all tricks and skills to improve"

My second friend says : " Solve different questions from different topics everyday and give virtual contests sparingly to learn and improve"

What I say : " Stick to one topic eg. Graphs or Binary Search for a week and try to solve all problems of that kind"

Now whose advice or method is the most optimum?

Which method do you follow?

Read more »

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

By compcodingisnorealskill, history, 6 months ago, In English,


Today I learned about DSU or Disjoint set union. Disjoint is basically when two sets have intersection == NULL. This is a powerful tool for : 1) Finding Cycles 2) Checking if two elements are in same group or not i.e linked by some logic together

Two really good questions for these are : 1167C - News Distribution and for cycles it is 1205B - Shortest Cycle

The main logic is to implement two functions 1) Find and 2) Union and then keep representatives of the set together.

Good luck! This tutorial on topcoder is good too Link to DSU

Read more »

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