Piyush and magical park

can u plz explain problem statement and testcases wisely,
thanku

Basically in this question you are given 4 variables, N and M as size of array , K as the strength he needs to get out of park safely, and S as the initial strength given, and thus its given that
if(ar[i][j]==ā€™.ā€™)
{
S=S-2;
Sā€“; // for every step
}
if(ar[i][j]==ā€™*ā€™)
{
S=S+5;
Sā€“; // for every step
}
if(ar[i][j]==ā€™#ā€™)
{
N=N+1; // for next line
}

and at any point if your (S<K) , then you will not be able to come out. I hope it does help you.