Блог пользователя Arthur_CN

Автор Arthur_CN, история, 6 часов назад, По-английски

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}) $$$.

  • Проголосовать: нравится
  • +5
  • Проголосовать: не нравится