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

Автор compcodingisnorealskill, история, 5 лет назад, По-английски

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?

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

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

Автор compcodingisnorealskill, история, 5 лет назад, По-английски

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

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

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