utkarsh_108's blog

By utkarsh_108, history, 9 months ago, In English

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

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

»
9 months ago, # |
  Vote: I like it 0 Vote: I do not like it

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

»
9 months ago, # |
Rev. 2   Vote: I like it +1 Vote: I do not like it

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
  • »
    »
    7 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

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

  • »
    »
    4 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Very helpful thankyou could you share more problems of diff techniques