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

Автор improvement_19, история, 2 года назад, По-английски

https://codeforces.com/problemset/problem/177/C1 please help how to solve this question thanks in advance

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

»
2 года назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

You have to invite everyone in a connected component (condition 1) and everyone you invite must be apart of the same connected component (condition 3). Connected components which have two people that dislike each other in it is invalid (condition 2), so the answer is simply the maximum size of all valid connected components.