compcodingisnorealskill's blog

By compcodingisnorealskill, history, 5 years 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?

Full text and comments »

By compcodingisnorealskill, history, 5 years ago, In English

Hello,

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 - Распространение новостей and for cycles it is 1205B - Кратчайший цикл

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

Full text and comments »