|
|
вернуться в форум:) My solution works 0.02 sec :) It needs only to find all primes from 2 to N and in addition - O(N) time Re: :) > 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: :) 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 сен 2007 02:58 So what? I have a solution working 0.01 seconds. It uses Lezandr theorem. |
|
|