Problem H from Goodbye 2015

Revision en1, by Mikester, 2016-01-07 01:14:45

Hey guys ! I kind of need your help to understand why I can't get past a test on this problem: http://mirror.codeforces.com/contest/611/problem/H

It fails on test 3. I've extracted that test, ran it with my solution and to me it seems nothing is wrong. The checker reports "Graph is not connected", which is weird because if you check the output, it IS connected. Every node is either connected to either node 1 or node 10, and nodes 1 and 10 are connected with each other.

My solution: http://mirror.codeforces.com/contest/611/submission/15219155 Input of Test 3: http://pastebin.com/F2CwiYdZ My solution's output to Test 3: http://pastebin.com/RbcpfP5e

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English Mikester 2016-01-07 01:17:43 7 Tiny change: 'y node is either connected' -> 'y node is connected'
en2 English Mikester 2016-01-07 01:17:02 20 Tiny change: ' problem: http://cod' -
en1 English Mikester 2016-01-07 01:14:45 678 Initial revision (published)