Сука блядь

h2022002 2023-07-18 10:17:55

#include<bits/stdc++.h> using namespace std; int main() { int x,n,ans,tot,yoy=0; cin>>x>>n; int a[x+1][n+1]; for(int i=0;i<=x-1;i++) { for(int t=0;t<=n-1;t++) { cin>>a[i][t]; } } cin>>ans>>tot;

if(ans-1<0)
{
	yoy+=0;
}
else
{
	yoy+=a[ans-1][tot];
}
if(ans+1>=n)
{
	yoy+=0;
}
else
{
	yoy+=a[ans+1][tot];
}
if(tot-1<0)
{
	yoy+=0;	
} 
else
{
	yoy+=a[ans][tot-1];
}
if(tot+1>=x)
{
	yoy+=0;
}
else
{
	yoy+=a[ans][tot+1];
}
cout<<yoy;
return 0; 

}