|
|
My AC solution (6438921) does not work on this test 2 111111110000 6 1 9 2 3 3 4 5 11 6 7 7 8 Please add it. Moreover, I think there could be found much more tricky tests than the one above. Please try to do that and add them too (I am too lazy to help you with that :) ). You may look into my submission 6438944 where this case is handled (presumably as well as all other tricky cases). I got AC with random shuffle, the tests are weak for sure. Could you send test against your solution to sp@urfu.ru ? :) "It is guaranteed that at least one solution exists", i.e. size of connecting component of friends <= 6. regroup all connecting component set by size and, how much people in this set like main, and side. example: 1-group: 6 people 2-group: 5 people : 2.1) 4 like main , 1 side or 2.2) 3 like main, 2 side 3-group: 4 people : 3.1) 4 like main or 3.2) 3 like main 1 side 3.3) 2 like main, 2 side . ------------------------------------------------------------------ ........................................... ----------------------------------------------------------------- think permutations of this sets. |
|
|