Tile Topology
Your boss is re-tiling his bathroom and wishes to know how many unique ways there are to arrange an arbitrary number of tiles on the wall. He has assigned you to figure this out, but won't tell you how many tiles he has.
Input and Output
Design a program that accepts the number of tiles and returns the number of unique different arrangements. An arrangement is unique if it cannot be rotated in two dimensions to match any other arrangement.
For example, if there were 3 tiles, there are 2 possible arrangements:
Note that the following arrangement does not count because it can be rotated on a plane into one of the previous shapes:
Also note that the following two arrangements are different because they cannot be rotated into the same shape:
Sample Input
3
Sample Output
2This Question came from ACM problemset 10 years ago.
Give me a hand and share your wisdom with us.Thank you.
Your boss is re-tiling his bathroom and wishes to know how many unique ways there are to arrange an arbitrary number of tiles on the wall. He has assigned you to figure this out, but won't tell you how many tiles he has.
Input and Output
Design a program that accepts the number of tiles and returns the number of unique different arrangements. An arrangement is unique if it cannot be rotated in two dimensions to match any other arrangement.
For example, if there were 3 tiles, there are 2 possible arrangements:
Note that the following arrangement does not count because it can be rotated on a plane into one of the previous shapes:
Also note that the following two arrangements are different because they cannot be rotated into the same shape:
Sample Input
3
Sample Output
2This Question came from ACM problemset 10 years ago.
Give me a hand and share your wisdom with us.Thank you.
Here is the new one.Tile Topology
Your boss is re-tiling his bathroom and wishes to know how many unique ways there are to arrange an arbitrary number of tiles on the wall. He has assigned you to figure this out, but won't tell you how many tiles he has.
Input and Output
Design a program that accepts the number of tiles and returns the number of unique different arrangements. An arrangement is unique if it cannot be rotated in two dimensions to match any other arrangement.
For example, if there were 3 tiles, there are 2 possible arrangements: *** **
*
Note that the following arrangement does not count because it can be rotated on a plane into one of the previous shapes: *
**
Also note that the following two arrangements are different because they cannot be rotated into the same shape: *** *
* ***
Sample Input
3
Sample Output
2Here each "*" stands for a tile.
Thanks.
Sorry again for being careless.
Here is the new one.
Tile Topology
Your boss is re-tiling his bathroom and wishes to know how many unique ways there are to arrange an arbitrary number of tiles on the wall. He has assigned you to figure this out, but won't tell you how many tiles he has.
Input and Output
Design a program that accepts the number of tiles and returns the number of unique different arrangements. An arrangement is unique if it cannot be rotated in two dimensions to match any other arrangement.
For example, if there were 3 tiles, there are 2 possible arrangements:
*** **
*
Note that the following arrangement does not count because it can be rotated on a plane into one of the previous shapes:
*
**
Also note that the following two arrangements are different because they cannot be rotated into the same shape:
*** *
* ***
Sample Input
3
Sample Output
2
Here each "* " stands for a tile.
Thanks.
*is a valid arrangement or not, becauseif so, may i say **
* a valid one? and **
*huh? there is no rule that all tilesshould be adjacent horizontally or vertically?
You are hight hand all!
or
[email protected] got more & more interested in it ^_^