Points: 15 (partial)
Time limit: 3.0s
Memory limit: 32M
Given two integers and , output all the prime numbers between and inclusive, one per line.
and will be positive integers less than or equal to .
The difference between and will be less than or equal to .
5 7 11 13 17 19
I'm getting a segmentation fault on the last test case. Can someone have a look at my code please?
You're running out of memory. You allocate an array that's M long, which will be <= 1,000,000,001. Assuming the largest possible value, that's 1,000,000,001 bools * 1 bytes per bool which equals 1000Mb. Obviously the problem limit is 32Mb, so it fails.