title: iter all possible tetris block forms
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/4650762/programming-contest-question-counting-polyominos">Programming Contest Question: Counting Polyominos</a>  </p>
  </blockquote>
  
  
  
  <p>There are different types of Tetris shapes. For example in shape like letters <code>T L I Z J O S</code>.  </p>
  
  <p>I'm trying to get an algorithm that can create these blocks.
  I'm using C++, but pseudocode would be good enough. Any ideas how to solve it or how to describe the problem to search better for it?</p>
  
  <p>Block is the smallest part of a Tetris shape. If you have 4 blocks to create a shape, then there are only 7 possible shapes:</p>
  
  <pre><code>X      X    X
  X  XX  X    X   X   XX  XX 
  X  XX  XX  XX  XXX XX    XX
  X
  </code></pre>
  
  <p>Rotations doesn't count. If you have 3 blocks, then you can shape only 2 blocks:</p>
  
  <pre><code>X   X
  X  XX
  X
  </code></pre>
  
  <p>How many shapes exist when you have <code>n</code> blocks? And how do they look like?</p>