AngelKnows's blog

By AngelKnows, history, 4 years ago, In English

Problem: Suppose $$$cnt(i)$$$ represents the number of occurrences of $$$i$$$ in array $$$A$$$ of length $$$n$$$ whose elements are between $$$1$$$ and $$$n$$$. An array is called a $$$k$$$-good array if and only if $$$cnt(k)=k$$$. Let $$$f(k)$$$ be the number of all $$$k$$$-good arrays. You are to calculate the $$$\sum\limits_{k=1}^n f(k)$$$.

This problem looks like some dp problems which can be reduced to a simper form and solved by Kunth's Mechanical Summation. But I haven't thought up a good solution.

Could you share your ideas about this problem?

Full text and comments »

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

By AngelKnows, history, 6 years ago, In English

I found that I forgot some details of some algorithms, but I felt it boring to learn these details again and I am more willing to learn new algorithms. The most important thing is that I can't get in the state of practicing problems. When I was in a good state, good ideas would come up naturally during solving problems. But I don't know how to reach this state again because it seems to have nothing to do with memories of concrete algorithms. What do top coders do to keep them in a good state for long although some of them don't practice frequently? For keeping memories of concrete algorithms, we can take notes. But what can we do for keeping the special feeling of solving problems?

Full text and comments »

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