#include
using namespace std;
int main() { int i,j,n,m,s,k;
cin>>n;
cin>>m;
cin>>k;
cin>>s;
char s1[10][10];
for(i=0;i<n;i++)
{for(j=0;j<m;j++)
{
cin>>s1[i][j];
}
}
for(i=0;i<n;i++)
{
for(j=0;j<m;j++)
{
if(s1[i][j]==’.’)
s=s-3;
else if(s1[i][j]==’*’)
s=s+4;
else if(s1[i][j]==’#’)
{s=s+1;
break;
}
}
}
if(s>=k)
{
cout<<"yes"<<endl;
cout<<s;
}
else
cout<<"no";
}
i am geetting all the cases error .want to know the error and also the best way of doing this