Weekly Training Farm 25 — Editorial

Правка en1, от dreamplay, 2017-02-26 16:07:29

Problem A

This is an adhoc problem. We just need to consider all the possible cases of joining. Note that we can join 2 rectangles only along their common side lengths, if any.

For n = 1, it is trivial, check if it is a square.

For n = 2, only possible way is to to join the 2 rectangles.

For n = 3, we have two cases. Either join them all linearly, all 3 in a row kind of fashion. Another way is to join the 2 rectangles to form a greater rectangle and then join third one, perpendicularly.

For all of the above cases, if it is possible to form a square, the side length of square is the largest length / breadth from rectangles.

Теги weekly training farm, #editorial, discussion

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en20 Английский dreamplay 2017-02-26 18:42:27 2 Tiny change: 'in range [$-10^8$, $10' -> 'in range [-$10^8$, $10' (published)
en19 Английский dreamplay 2017-02-26 18:41:25 676 (saved to drafts)
en18 Английский dreamplay 2017-02-26 17:46:03 0 (published)
en17 Английский dreamplay 2017-02-26 17:44:00 4 Tiny change: 'uired LCM.\nAnother ' -> 'uired LCM.<br>\nAnother '
en16 Английский dreamplay 2017-02-26 17:42:33 628 (saved to drafts)
en15 Английский dreamplay 2017-02-26 17:35:32 1 (published)
en14 Английский dreamplay 2017-02-26 17:34:51 2803
en13 Английский dreamplay 2017-02-26 17:29:56 1017
en12 Английский dreamplay 2017-02-26 17:25:15 896
en11 Английский dreamplay 2017-02-26 17:23:17 331
en10 Английский dreamplay 2017-02-26 17:17:57 30
en9 Английский dreamplay 2017-02-26 17:16:42 16
en8 Английский dreamplay 2017-02-26 17:15:50 1086 (saved to drafts)
en7 Английский dreamplay 2017-02-26 17:07:38 15
en6 Английский dreamplay 2017-02-26 17:01:07 0 (published)
en5 Английский dreamplay 2017-02-26 17:00:05 32
en4 Английский dreamplay 2017-02-26 16:59:20 8
en3 Английский dreamplay 2017-02-26 16:58:26 1949
en2 Английский dreamplay 2017-02-26 16:25:52 749
en1 Английский dreamplay 2017-02-26 16:07:29 695 Initial revision (saved to drafts)