Can not understand why get WA in test 1
Difference between en1 and en2, changed 342 character(s)
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↵

![ ](/predownloaded/3c/fa/3cfa353f22bbfa3a72f06914494b0f6d341994ea.png)↵

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?  

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English Philosophi 2026-03-05 06:36:56 342
en1 English Philosophi 2026-03-04 13:27:20 161 Initial revision (published)