Tray Bien: Difference between revisions

From programming_contest
Jump to navigation Jump to search
imported>Kmk21
Created page with "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..."
 
imported>Kmk21
No edit summary
Line 3: Line 3:
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:
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:


<nowiki>
<code><nowiki>
#
#
#
#
Line 35: Line 35:
X
X
X
X
</nowiki>
</nowiki></code>

Revision as of 01:42, 7 November 2017

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