>Hi!
>
>>I need more details about the problem. For example, what is the size of the square, what is the size of each rectangle?
>
>There is no size defined, it could change for both.
>This solution is for a printer house, they want to find the most efficient
>way to print their posters, flyers, books, etc.
>
>Regards
I think you should write a program to experiment.
Check one rectangle on its wide side (a lo ancho), and fit as many as possible (to the right) on its high side (a lo alto), and see how many fit.
Then, put two rectangles on their wide side, and as many as fit on its high side.
Repeat until you fill the entire width with rectangles on their wide side.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)