TUDORTEA's blog

By TUDORTEA, history, 4 years ago, In English

Link of the problem is https://www.spoj.com/problems/PRIMES2 .

Which algorithm should be used to solve this problem? And how wheelSieve + segmentedSieve is implemented?

Thank you in advance.

  • Vote: I like it
  • -19
  • Vote: I do not like it

| Write comment?
»
4 years ago, # |
  Vote: I like it +11 Vote: I do not like it

see this and please try googling stuff(to know if it's solution already exists somewhere) before posting new blog.

  • »
    »
    4 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    first of all, thank you. I tried codes from your link, but I got TLE. What should I do to avoid to TLE???