Rating changes for last rounds are temporarily rolled back. They will be returned soon.
×
517. Cornerless Tiling
Time limit per test: 0.25 second(s)
Memory limit: 262144 kilobytes
input: standard
output: standard
An
cornerless tiling of an
mx
n rectangle is such tiling of this rectangle with 1x 2 and 2x 1 dominoes that no four dominoes share a corner.
For example, here are the two possible cornerless tilings of 4x 4 square:
How many cornerless tilings of
mx
n rectangle are there?
Input
First and only line of the input file contains two integers
m and
n, 1 ≤
n,
m ≤ 1000.
Output
In the only line of the output file write the sought number of tilings.
Example(s)
sample input | sample output |
4 4
| 2
|