#include<bits/stdc++.h>
using namespace std;
int main() {
int n,m,k,s;
cin>>n>>m>>k>>s;
char a[n][m];
for(int i=0;i<n;i++){
for(int j=0;j<m;j++){
cin>>a[i][j];
}
}
bool flag = false;
for(int i=0;i<n;i++){
if(s<k){
flag = false;
break;
}else{
for(int j=0;j<m;j++){
if(a[i][j] == ‘.’){
s = s-2;
s = s-1;
}else if(a[i][j]==’*’){
s = s+5;
s = s-1;
}else{
break;
}
}
}
}
if(s>=k){
flag = true;
}
if(flag){
cout<<“Yes\n”;
cout<<s<<endl;
}else{
cout<<“No\n”;
}
return 0;
}
it is giving error for given test case answer is coming out to be 11 but it should be 13
Pls check once