Tray Bien

From programming_contest
Revision as of 01:43, 7 November 2017 by imported>Kmk21
Jump to navigation Jump to search

This problem asks us to fill a 3-by-x foot space with trays of 2x1 or 1x1 and report back the number of ways to do it.

This is a pretty standard DP problem. The idea is that we systematically fill from the left and track how many ways the "front' of trays can look. It turns out there are 7:

#
#
#

X
#
#

#
X
#

#
#
X

X
X
#

X
#
X

#
X
X

X
X
X