http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1171
Problem B: Savage Garden |
Mr. Savage has a huge square-shaped garden named Savage Garden. The Savage Garden is very famous for its rare plants and amazing beauty. Currently, he is thinking of improving the garden by changing the orientation of plants into a special way. He wishes to divide the garden into smaller square regions such that the length of the complete square region is a power of two. Then, he wants to group the regions into L-shaped regions formed by three smaller squares. Each L-shaped region will have a different plant from the adjacent L-shaped regions. He feels that the