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 1055. Combinations

Show all messages Hide all messages

:) Orshanskiy Sergey 4 Nov 2002 05:39
My solution works 0.02 sec :)
It needs only to find all primes from 2 to N and
in addition - O(N) time
Re: :) Lego Haryanto 6 Nov 2002 14:23
> My solution works 0.02 sec :)
> It needs only to find all primes from 2 to N and
> in addition - O(N) time

0.02 sec !!! Must be an extremely clever solution ...
Could you give any further hint following the O(N) hint you gave us
already ???

Thanks,
LG
Re: :) mathfrog 27 Aug 2007 09:39
 i've got this
 1055 C Accepted  0.015 647 KB
-------------------------------
you should do a preprocess ,if m >= [n/2] ,let m be n - m.
Re: :) Denis 13 Sep 2007 02:58
So what? I have a solution working 0.01 seconds. It uses Lezandr theorem.