Tilling problem

can you please explain what should be the answer for test case 45 wall…can you please clear for the case of horizontal tiles the total ways for 14 is 4 because there are 4 rows or it can be considered as 1 for all the 4 rows …for verticall case it is clear that as there are 4 rows so 4*1 fit in only one possible solution.

@nikhilmeena Please refer this. I have explained before Please help me to understand the question

still i m getting errors in 4 test cases …please help me …?

I would suggest you to attempt this question after studying Dynamic programming. The constraints are large so only the Dynamic programming solution will pass all the test cases.