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

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

The below article is an attempt to create a good starting point for people who practice some good DSU problems

you read the Nice blog by kartik8800 DSU Blog here you tell basics to advanced about DSU

below code is written by striver you can take reference from his YT channel TAKE U FORWARD

striver_79

standard DSU


#### PROBLEM 1

1 -> This Problem Based how we can use DSU beautifully by sorting the edges of the graph

1213G - Path Queries

Hint 1
Hint 2
DSU code

Check my submission


#### PROBLEM 2

2 -> This Problem is easy side of DSU to make the network connected

25D - Roads not only in Berland

Hint 1
DSU code

Check my submission


#### PROBLEM 3

3 -> you have to make forest by adding edges by making two DSU

1559D1 - Mocha and Diana (Easy Version)

Hint 1
DSU code

Check my submission


#### PROBLEM 4

4 -> This Problem Based how we can minimise the or of the no by making highest bit to Zero

1624G - MinOr Tree

Hint 1
DSU code

Check my submission


#### PROBLEM 5

5 -> This Problem Based how we can use DSU to connect the edges from edge weight form low to high

1468J - Road Reform

Hint 1
DSU code

Check my submission

this is good level 5 problem enough to Grasp the concepts if you want to try more prblem try this Codeforces DSU Problems

ALL THE BEST FOR YOUR CODING JOURNEY :)

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

»
4 месяца назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Auto comment: topic has been updated by utkarsh_108 (previous revision, new revision, compare).

»
4 месяца назад, # |
Rev. 2   Проголосовать: нравится +1 Проголосовать: не нравится

Here are two other DSU problems

https://atcoder.jp/contests/abc335/tasks/abc335_e

https://mirror.codeforces.com/problemset/problem/1914/G1

They introduce a technique commonly done with DSU, that is:

Spoiler
  • »
    »
    2 месяца назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    thank you for this, do you have more dsu related problems which introduce a particular concept?

  • »
    »
    4 часа назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    Very helpful thankyou could you share more problems of diff techniques