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 1013. K-based Numbers. Version 3

long-number arithmetic????
Posted by guseva polina 17 May 2002 00:56
long-number arithmetic?
i thank that the resulting number is the next summ:
  N
 ___ i        i
 \_ C   *(K-1)
 /__ N-i

i=[N/2],   where C is  i!/((N-i)!*(2*i-N)!)

and so we have to apply a long-number arithmetic,am I right?
but it is no so fast for this problem!i get a time limit exceeded
(it was worked for #1012)
help me please
maybe there are another faster algorithm?
Use DP (yes it's long-number arithmetic, only sums)(-)
Posted by Miguel Angel 6 Jun 2002 06:51
> long-number arithmetic?
> i thank that the resulting number is the next summ:
>   N
>  ___ i        i
>  \_ C   *(K-1)
>  /__ N-i
>
> i=[N/2],   where C is  i!/((N-i)!*(2*i-N)!)
>
> and so we have to apply a long-number arithmetic,am I right?
> but it is no so fast for this problem!i get a time limit exceeded
> (it was worked for #1012)
> help me please
> maybe there are another faster algorithm?