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?









You should run the sample test before submitting it...
Yes, but i dont understand why my answer is wrong =)). If my understanding of the statement is right, my answer should be correct, but i got WA. If you are kind enough could you please tell me why my answer in test 1 is wrong ?
Oh- sorry, I didn't understand your question
Auto comment: topic has been updated by Philosophi (previous revision, new revision, compare).
afaik you understood the problem right, but on the submission page your code responds to sample 1 with
1110010and the jury answer1110001your answer would mark edges the following edges red: (1, 2) (2, 3) (3, 4) (1, 3) which doesn't match your drawing. The jury's answer matches your drawing with red and blue swapped though.
Oh crap! thank you so much! Turn out i was making mistake in checking my answer