I am not able to get why the answer of the all connected components will be the product of the answer of single components
Beautiful Graph Question in the Competitive Programming Section
Hi so here the answer of the all connected components will be the product of the answer of single components. This is because we have to consider all combinations. For example there are 2 components with each having respective ans 2 and 3. so in total there would be 6 ways. each ans from each component can be permuted with ans of other component.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.