Doubt regarding Deepak's Prime

https://hack.codingblocks.com/contests/c/473/700

Code : https://ide.codingblocks.com/s/42708.

I am new to C++ and was not able to understand the solution given with this course. How should I proceed ahead?

you have to compute nth prime number and maximum value of n=5000000 and
5000000th prime number is 86,028,121.
So size of prime array should be 86,028,121.
and this can not be store in int array so use bool array instead of integer array.
Max array size as int =10^7;(generally)

and sieve loop should not iterate from 1 to n
it should iterate from 1 to 86,028,121 as your prime number will be in this range.

Change your Code according to given guidelines and do query if you didnt get correct answer.
All the best.

Hit like if u get it .