Page 1 of 1

PLEASE I WILL VOTE!!

Posted: Thu Jul 14, 2022 2:10 pm
by answerhappygod
PLEASE I WILL VOTE!!
Please I Will Vote 1
Please I Will Vote 1 (43.91 KiB) Viewed 26 times
Task 5 . We have 24 squares with sides 1,2,3,…,24 cm. Write a program that places some of them (maybe all) on a square board of side 70 cm in such a way that the following conditions are met: a) the coordinates of the upper left corner of each square are integers, b) each square fits entirely on the board, c) the squares do not overlap (but may meet, with corners or sides), d) the sides of the squares to be arranged are parallel to the corresponding sides of the board. Try to minimize area of the board that remains uncovered. Your program should work less than a minute. The proposed solution should be printed in the following format: 5 - the first line should contain the area of the board that remains uncovered, - it should be followed by 70 lines of 70 characters representing the arrangement of squares, each character is a dot (meaning no square) or the letter 'ABCDEFGHIJKLMNOPQRSTUVWX' ('A' means belonging to a square with side 1 , 'B' - with side 2 , etc.).