UBERMENSCH.'s blog

By UBERMENSCH., history, 6 years ago, In English

Problem Link : https://www.spoj.com/problems/PRIMES2/ My Tle Solution : https://pastebin.com/wXtp0wVf In this problem you have to generate primes upto 10^9 . Time limit: 2.281s

  • Vote: I like it
  • 0
  • Vote: I do not like it

| Write comment?
»
6 years ago, # |
Rev. 2   Vote: I like it +4 Vote: I do not like it

i thought that sieve algorithm is the best algorithm to generate prime numbers and if n is 1e9 we use segmented sieve but sieve and segmented sieve have the same time complexity so i start searching for something else "thanks to you :p " i find an old post on codeforces that it may help you :D