Code isn't compling on CodeChef

I tried this code on TurboC++ and on CodeBlocks, in both cases the code gave desired output but the code isn’t compiling on CodeChef.
When i tried with TurboC++ I got compiling error and when I tried with CodeBlocks I am getting runtime error.
The code is:
#include
using namespace std;
int main()
{
int **A=0,*B=0,i,j,x,y,x1,y1,x2,y2,l=0,n,b,k,sum;
cin>>i>>j;
A=new int *[i];
for(x=0;x<i;x++)
A[x]=new int[j];
x=0;
for(x=0;x<i;x++)
{
for(y=0;y<j;y++)
cin>>A[x][y];
}
cin>>n;
B=new int[n];
for(int a=0;a<n;a++)
{
cin>>b;
if(b==1)
{
cin>>x1>>y1>>x2>>y2>>k;
for(x=x1-1;x<x2;x++)
{
for(y=y1-1;y<y2;y++)
A[x][y]=A[x][y]+k;
}
}
else if(b==2)
{
sum=0;
cin>>x1>>y1>>x2>>y2;
for(x=x1-1;x<x2;x++)
{
for(y=y1-1;y<y2;y++)
sum=sum+A[x][y];
}
B[l]=sum;
l++;
}
else
cout<<“Wrong Type”;
}
for(x=0;x<l;x++)
{
cout<<B[x]<<endl;
}
return 0;
}