Prime1 TLE help

i have used the sieve for generating primes and still getting a tle… can anyone suggest a way…
im generating primes upto sqrt of 10^9 using sieve first and using sieve again for the range.

my submission is CodeChef: Practical coding for everyone

you need segmented sieve. need code ? comment below

can you say how… i will try to code it…