The compiler error is :
Process returned -1073741571 (0xC00000FD) execution time : 0.997 s Press any key to continue.
My code:
#include <iostream>
using namespace std;
int main()
{
int n,m,a[1001][1001];
cin>>n>>m;
for(int i = 1; i<=n; ++i)
for(int j = 1; j<=m; ++j)
cin>>a[i][j];
int s = 0;
for(int j = 1; j<=m; ++j)
{
int minn = a[1][j];
for(int i = 2; i<=n; ++i)
if(a[i][j]<minn) minn = a[i][j];
s = s + minn;
}
cout<<s;
}
Is this due to memory allocation? Do I have to reserve more ram to code blocks?
User contributions licensed under CC BY-SA 3.0