ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Common Board

disjoint set union division
Posted by shweta 19 Aug 2016 22:15
There is an undirected graph with n vertices and m edges. There have been three types of requests: to add an edge (X_i, y_i), remove the edge (X_i, y_i), and check whether or not vertices x_i and y_i connected.

I read  this problem(disjoint set union division) in this site http://e-maxx.ru/algo/sqrt_decomposition (this is in russian but i use google translate)
The approach is also given, they use disjoint sets with sqrt decomposition. I didn't understand this . plz help.