What was the mistake?
i was redeclaring the array inside main() too.
use online compiler , i use “compile c++ gcc online” , if the array is so large.
//g++ 7.4.0
#include <iostream>
int main()
{
int n=100000;
while(n--){
int a[100000000]={0};
}
}
I used a single vector of size 1e6 + 5. It was ok with my system. and also on Online platforms, make sure you not running out of stack due to other reason.