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

Автор AngelKnows, история, 4 года назад, По-английски

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?

Полный текст и комментарии »

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

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

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?

Полный текст и комментарии »

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