title: 2d array causing run time error
body: <p>Here is my code, strangely excerpt of it is working fine. However, the main program is having run time error due to this array ss. </p>
  
  <pre><code>#define FOR(i,n) for(i=0;i&lt;n;i++)
  unordered_map&lt;int,int&gt;m;
  </code></pre>
  
  <p>........</p>
  
  <pre><code>int ss[1000][1000]={0};
  
          FOR(i,n){
              FOR(j,n){
                  if( (i+1 &lt; n) &amp;&amp; A[i][j]==A[i+1][j]+1 )
                  {
                      if(ss[i][j]==-1)ss[i+1][j]=A[i][j];
                      else ss[i+1][j]=ss[i][j];m[ss[i+1][j]]++;
                  }
                  if((j+1 &lt; n) &amp;&amp; A[i][j]==A[i][j+1]+1)
                  {if(ss[i][j]==-1)ss[i][j+1]=A[i][j];
                  else ss[i][j+1]=ss[i][j];m[ss[i][j+1]]++;
                  }
  </code></pre>
  
  <p>When i try to increment its value in m, it causes the run time error.</p>