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 2024. Adventure Time

Please send some examples
Posted by Nataraj 1 May 2016 00:08
Could somebody who solved this problem send some examples of tests and solutions?

I thought that I wrote a correct algorithm, that summarise number of stones of each type, then sort it and then check how many permutations of the last one that makes it equal to K, there is and calculate a number of possibilities. But I get error on Test 3.
Or may be I did not understood the task,
Re: Please send some examples
Posted by Nataraj 1 May 2016 00:13
I found the bug, but now I get wrong answer for test 26
Re: Please send some examples
Posted by Nataraj 1 May 2016 00:45
Finally solved it. The last bug was to find a function that calculates factorial coefficients (ncr) without going to big numbers.
Re: Please send some examples
Posted by Kogut.Ivan 14 Nov 2016 09:52
What is the principle of this function?