Arthur_CN's blog

By Arthur_CN, history, 5 hours ago, In English

The things happens like that, I got WA in a problem, which is related to Matrix Tree Theory.

When I checked the details, I found that I was wrong on column 1.

And then, I found another interesting fact that my answer and the standard answer are opposite numbers to each other.

After thinking for a long time, I noticed this:

$$$ \det(-A) = \det(A) * (-1)^{\operatorname{deg}(A)} $$$

So I checked my code, and found I have compute $$$ \det(A - \operatorname{Deg}) $$$.

  • Vote: I like it
  • +5
  • Vote: I do not like it