I am solving a question and I have declared 4 arrays-- 3 1-Dimensional and 1 2-Dimensional Array. The value of N i.e the size of the array can be at max 10^5. The sizes of all the arrays are declared after taking the input.

Code:-

```
#include<iostream>
int main()
{
int a,b;
cin >> a >> b;
int arr[a][b];
for(int i=0;i<a;i++)
{
for(int j=0;j<b;j++)
cin >> arr[i][j];
}
return 0;
}
```

The values of and b can be at MAX 10^5. The other three arrays can also have size at max 10^5 and are in terms of b i.e

int arr[b].

However I am getting a SIGSEV Error. Any tips to optimize this piece of code?