|
|
вернуться в форумlong-number arithmetic???? 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)(-) > 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? |
|
|