Is1500EnoughForEGOI's blog

By Is1500EnoughForEGOI, history, 6 years ago, In English

There is a graph with N vertices and two types of queries:

1) connect U and V

2) disconnect U and V

After each query, the number of connected components should be printed. Is there a better solution than O(NQ)?

»
6 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

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

»
6 years ago, hide # |
 
Vote: I like it +6 Vote: I do not like it
»
6 years ago, hide # |
 
Vote: I like it +6 Vote: I do not like it

This is a dynamic connectivity problem. It was explained on Brazil's 2016 ICPC Summer School here.

»
6 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

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