Gold_Dino's blog

By Gold_Dino, history, 4 months ago, In English

As usual, we may encounter a problem of the following form: Given is an energy function $$$D_{c_i}(i)$$$ where $$$c_i \in [0 \dots k)$$$, and another energy function $$$V_{c_i,c_j}$$$ where $$$(i,j) \in E$$$. Minimize the total energy of the sum.

In certain conditions, such as: $$$k=2$$$ and $$$V_{0,0}+V_{1,1}\le V_{0,1}+V_{1,0}$$$, it can be solved by classic graph cut method.

More generally, what conditions are meet for $$$D$$$ and $$$V$$$ such taht it can be solved by graph cut. However, it's too difficult for me.

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By Gold_Dino, history, 16 months 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}) $$$.

Full text and comments »

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

By Gold_Dino, 16 months ago, In English

As Christmas was a few days ago, I want to get the background image customized for Christmas on CodeForces. But How?

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it