|
|
back to boardReady algorithm and all tests for lazy boys :) Posted by D4nick 4 Nov 2020 21:19 http://e-maxx.ru/algo/connected_componentsYou need to output number of components minus 1. Tests: 4 4 0 3 4 1 2 3 1 2 4 0 1 0 0 0 6 0 0 5 6 5 1 1 2 1 4 2 5 3 6 4 5 1 2 1 6 5 0 1 2 1 4 2 5 3 6 4 5 1 6 3 4 1 2 2 3 4 5 2 6 4 0 1 3 3 4 4 6 5 6 1 Edited by author 04.11.2020 21:20 |
|
|