array size limit disadvantage

how to overcome the array disadvantage of max size of approx 10^6 or 10^7? Because most questions in codechef have constraints of about 10^8 and higher. Response awaited…(preferably in c++ if soln is language dependent)

if the constraint is 10^8 or higher it means you’re not supposed to use array of linear size. If you need those many boolean values you could use bitset. otherwise it’s intended that you don’t use such an array.

Array of size {10}^{6} were never a problem. But more than {10}^{7} is always a problem. Its a huge constraint on memory.