Problem with MinGW compiler


To solve the problem, I declared two integer arrays of length 10^6. Now the problem is that when I compiled the code and ran on my windows machine with MinGW compiler, my code didn’t execute. No error was given on terminal. I use a Sublime Text setup with MinGW so some error like:
[Finished in 2.9s with exit code 3221225725] was shown on Sublimes terminal.

Same code without any changes got an AC verdict on Chef.

I am pretty sure that MinGW has a smaller limit for amount of data I can use than g++ on Linux or codechef. Surprisingly, declaration of such big arrays can be okay sometimes, and randomly show an error sometime on MinGW.

Can anyone suggest some workaround for this problem?

Happened with me as well. That’s why I generally use vectors for n>5e+5.

1 Like