Tiling problem-----2

https://online.codingblocks.com/player/16682/content/10339/5208

Bhaiya Can you give me hint of this question.
@phantom

there r two ways
either u can place horizontally or vertically
for horizonatally no problem as size for 1 row is 1xm and tile=1xm
but when u place vertically size is nx1 and u have the tile mx1 so when n>m then u can only place it

https://hack.codingblocks.com/contests/c/669/875