title: C++ code not showing output when array size is to large(eg. size >= 800) but working fine in online compiler
body: <p>I don't understand why this is happening.</p>
  <p>The Code is working fine, but it won't show output in my system when I take a large array size and on the other side it gives the correct output in the online compiler.</p>
  <p>It works fine and shows output in my system if I take a small array size.</p>
  <pre><code>#define N 805
  </code></pre>
  <p>Here is a code in C++ language.</p>
  <pre><code>#include&lt;bits/stdc++.h&gt;
  using namespace std;
   
  #define fast_io ios_base::sync_with_stdio(false);cin.tie(NULL);
  #define M 1000000007
  #define N 805
  #define ll long long int
   
  void init_start(){
      fast_io;
      #ifndef ONLINE_JUDGE
      freopen(&quot;input.txt&quot;, &quot;r&quot;, stdin);
      freopen(&quot;output.txt&quot;, &quot;w&quot;, stdout);
      #endif
  }
   
  int main()
  {
      init_start();
      int n, k, limi;
      cin&gt;&gt;n&gt;&gt;k;
      
      int n_arr[N][N];
      int k_arr[N][N];
  
      for (int i = 0; i &lt; N; i++)
      {
          k_arr[i][0]=0;
          k_arr[0][i]=0;
      }
   
      int mini = -1, maxi = 1000000000, mid;
      bool check;
      limi = ((k*k) / 2) + 1;
   
      for (int i = 0; i &lt; n; ++i)
      {
          for (int j = 0; j &lt; n; ++j)
          {
              cin &gt;&gt; n_arr[i][j];
          }
          
      }
       while((mini + 1) &lt; maxi)
       {
          mid = (mini + maxi) / 2;
          for (int i = 0; i &lt; n; ++i)
          {
              for (int j = 0; j &lt; n; ++j)
              {
                  k_arr[i+1][j+1] = k_arr[i+1][j] + k_arr[i][j+1] - k_arr[i][j];
                  if(n_arr[i][j] &gt; mid)
                  {
                      k_arr[i+1][j+1]++;
                  }
              }
          }
          check = false;
          for (int i = 0; i &lt; n-k+1; ++i)
          {
              for (int j = 0; j &lt; n-k+1; ++j)
              {
                  if ((k_arr[i+k][j+k] + k_arr[i][j] - k_arr[i][j+k] - k_arr[i+k][j])&lt;limi)
                  {
                      check = true;
                  }
              }
          }
          if (check)
              {
                  maxi = mid;
              }
              else
              {
                  mini = mid;
              }
       }
       cout &lt;&lt; maxi &lt;&lt; endl;
      return 0;
  }
  
  </code></pre>