Editorial for Mock CCC '18 Contest 2 J4/S2 - A Geometry Problem
Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.
Submitting an official solution before solving the problem yourself is a bannable offence.
Author:
We start by computing the sum of the areas of the rectangle and checking that it is a perfect square.
We now wish to verify whether we can build a square with side length . One of the rectangles must
have a side length of
and be on the end of the rectangle. If it has dimensions
, then
we just need to check if the other two rectangles can form a rectangle with dimensions
.
Two rectangles can form a rectangle of dimensions if the rectangles have dimensions either
and
or
and
.
Comments