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

Автор Is1500EnoughForEGOI, история, 6 лет назад, По-английски

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
  • Проголосовать: не нравится