Ticket 14979
Problem 1674 -f
View hacks & all small testcases

Unable to dry run this testcase?
Try making a new request with small values of n_high, t_high, *_high, etc.


Retry
Input
4 9 5
.*.....**
*.*.*.*.*
..*...***
..**..***
1 6
1 1
4 9
1 8
4 8
Expected Output
11
11
10
10
9
Generator Parameters
--q_high 9 --q_low 1 --row_or_col_high 9 --row_or_col_low 1