I have a small chunk of C++ code that involves declaring some arrays of size 200005. When I run my code, it crashes right away. However, when I change const ll MX = 200005
to const ll MX = 20005
, that is, change the size of the three arrays to each be 20005 instead of 200005, my program runs without crashing. Why is this happening?
#include <iostream>
using namespace std;
typedef long long ll;
const ll MX = 200005;
int main() {
ll n; cin >> n;
ll x[MX], y[MX], v[MX];
return 0;
}