ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1353. Milliard Vasya's Function

I asking only for little hint.
Posted by cypherq 20 Mar 2010 21:41
Can you give me any hints, how to do this prog at least in minimally optimal way? I want to do this program alone, but without any hints a feel I will give up.
a hint
Posted by † Ленин † [Yaroslavl SU] 21 Mar 2010 05:55
You should use DP (Dynamic Programming) for calculating results for different Summs and Number length.
But its better to use 2 tables.
But its another hint. =)
Re: a hint
Posted by Kolyanich 25 Dec 2010 06:25
I didn't use DP at all and got AC in 0.14 sec.
The only hint you should take into account is:

The number of different permutations of n objects, where there are n1 indistinguishable objects of style 1, n2 indistinguishable objects of style 2, ..., and nk indistinguishable objects of style k, is

n!/ (n1! * n2! * ... nk!);

(c) regentsprep.org