Can not understand why get WA in test 1

Правка en2, от Philosophi, 2026-03-05 06:36:56

https://mirror.codeforces.com/contest/1726/submission/365331041 Can anyone tell me where did i do wrong in this solution ? thanks

Update: My answer in the first test can be drawn in a pic like this

If we remove blue we get 2 connected components, if we remove red we get 1 connected component. So in total we get 3, which is the same with the answer. Was my understanding wrong somewhere?

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский Philosophi 2026-03-05 06:36:56 342
en1 Английский Philosophi 2026-03-04 13:27:20 161 Initial revision (published)