HAPPY - Editorial

PROBLEM LINKS

Practice
Contest

DIFFICULTY

MEDIUM

EXPLANATION

2 Likes

This is a very great website off code website the chef really do talk in code and the food they made for us is really good these chefs are the exclusive.
Shop now

cant this problem be done by first shrinking the favorite edges ? then apply the matrix tree theorem on the resultant graph. or is shrinking the edges a problem?

1 Like

I know it’s almost three years old, but I would love to know if we could solve this problem by shrinking the favorite edges first and then simply calculating the Laplacian of the resultant shrinked graph, and then the det(L’(G))

1 Like