Thanks. But, I think that my solution was easier for me. We all have different Point of views though.
Of course, corrected, thanks!
I’m glad you like it 
You aren’t calling your check function recursively, due to which I think it gave WA for subtask 1. If you modify your check function, and call things recursively when assigning values, it should fix the issue. Luckily no such test case might be present in subtask 2 and 3, hence you survived them. 
Eg:
.?.
.?.
.B.
so dumb of me!!
thanks
This does not pass for the 2 and 3 subtasks! What can be the problem?
Please see this ![]()
So, I bruteforced your solution with one AC solution (100 points) for all possible input of 3x3 and 2x2. It gave same results.
Hence, possible problem could surely be due to your while(t–), and it turned out my fluke was right, and upon initializing arr with 0 in your exact code, lead to AC. ![]()
yes this worked, but i still didn’t get what the problem really is, when I am considering n in all of the functions and the code is checking in that n x n matrix only O_O
You might have crossed nxn while checking for surrounding points i.e. all 4 directions or something similar.
Why do you think so? And remember about multiple test cases (T ≤ 50).
Just to increase the feels, the SCHEDULE problem for this march long was like…well…we had an editorial of it right under our nose at the discussion forum XD
please see this!
@tni_md you cause overflow on subtasks 2 and 3. Change the type of ans variable from int to long long and you’ll get accepted CodeChef: Practical coding for everyone
Okay thanks 
For me it was this case
2
G?
…
Answer is 0 but my code was giving 1 as output.
I am also facing this problem.
Please help me for this .this is my solution
https://www.codechef.com/viewsolution/27268290
In the sample test case
7
?.?.?.?
.?.?.?.
?.?.?.?
.?.?.?.
?.?.?.?
.?.?.?.
?.?.?.?
why isn’t the answer 3^25?
as 3^25 is a big number so we have taken its mod with 1e9+7. 