Editorial for DMPG '19 B2 - Rectangular Molecules


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.

Author: AvaLovelace

First, we must find the positions of the largest and second largest values. An easy way of doing this would be setting the largest value to 0 after finding it, then looping through the 4 weights to find the largest one again.

If the two positions are 1 and 3 or 2 and 4, the molecule is trans; otherwise, it is cis.


Comments

There are no comments at the moment.