|
|
back to boardTo admins. This code with unitialised 'root' got crash on 10 test: int root;// = 0; for (i = 0; i < g.size(); ++i) if (g[i].size() == 1) { root = i; break; } where g[i] - vector of adjacent vertices for i-th vertex. So, graph in 10 test isn't tree. You are wrong. Graph in the 10th test is a tree. (-) Re: You are wrong. Graph in the 10th test is a tree. (-) Sorry :) I forgot about unique vertex. |
|
|