Tiling
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
Given a rectangular field composed of free and occupied cells, your task is to determine whether it is possible to cover the field entirely with 2×1 dominoes. Each domino must cover exactly two adjacent free cells, ensuring that each free cell is covered by one domino, while occupied cells remain uncovered. Additionally, no domino should extend beyond the field's boundaries.
Input
The input begins with two integers, R and C (1 ≤ R, C ≤ 100), representing the dimensions of the field. This is followed by R rows, each containing C characters, which describe the cells. Each cell is denoted by either '.' for free or '#' for occupied.
Output
Print "Yes" if it is possible to tile the field as described, otherwise print "No".
Examples
Input #1
Answer #1
Submissions 194
Acceptance rate 18%