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

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

Hi there!

I just encountered a problem on a forum seemingly uses DSU, but there is a query that makes me question my DSU.

There are a number n and n numbers that follow. There are 3 queries: + Put a and b together + Seperate a and b + Determine whether a and b is connected

I am thinking of a reverse-DSU technique.

Please help!

P/S: Thank you!

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

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

Rollback DSU

Also instead of saying "put A and B together", "merge/join A and B together" will be more formal.