Few test case failing

same code are using.

hi @roshani1997abr_911f71e73100e81b
refer

here , it’s working but in content problem some test are failing.

hi @roshani1997abr_911f71e73100e81b can u tell which cases are failing as its tested code

Hello
I am trying below solution here some test are failing.
test 2 and test 3 are failing.

https://hack.codingblocks.com/app/practice/6/1051/problem

hi @roshani1997abr_911f71e73100e81b wrking fine please check

Hello

This is code, I am using.

#include
using namespace std;

void magical_park(char a[][100], int m, int n, int k, int s){

// piyush can get out of the mark
bool success = true;

for(int  i = 0; i < m; i++){
    for(int j = 0; j < n; j++){
        char ch = a[i][j];

        // check 
        if(s < k){
            success = false;
            break;
        }
        if(ch == '*'){
            s += 5;
        }
        else if(ch == '.'){
            s -= 2;
        }
        else{
            break;
        }
        // we also loose  1 point when we move right except for the last column

        if(j != n - 1){
            s--;
        }
    }
}
 if(success){
    cout<< " Yes" << endl;
    cout << s <<endl;
 }
 else{
    cout << "No" << endl;
 }

}

int main(){

int m,n,k,s;

cin >> m >> n >> k >> s;

char park[100][100];
// take Input
for(int i = 0; i < m;i++){
for(int j = 0; j < n; j++){
cin >> park[i][j];
}
}

magical_park(park, m ,n, k, s);

return 0;
}

hi @roshani1997abr_911f71e73100e81b send the code on ide.codingblocks.com
write save send the url of the page

try the code i shared here https://hack.codingblocks.com/app/practice/1/1051/problem
@roshani1997abr_911f71e73100e81b