DMPG '19 B2 - Rectangular Molecules

View as PDF

Submit solution


Points: 3
Time limit: 2.0s
Memory limit: 64M

Author:
Problem type

Some molecules consist of 4 groups arranged in a rectangle. Let's call them rectangular molecules.

Each of the 4 groups has a different weight. If the two heaviest groups are at opposite corners of the rectangle, the molecule is a trans (Latin for "the other side of") molecule; otherwise, it is a cis (Latin for "this side of") molecule.

Given the weights of each of the 4 groups of a rectangular molecule, please determine if it is a trans or cis molecule.

Input Specification

Four distinct space-separated integers between 1 and 1\,000 inclusive, the weights of the groups at the four corners of the molecule in clockwise order.

Output Specification

Output trans if the molecule is a trans molecule or cis if it is a cis molecule.

Sample Input 1

3 1 4 2

Sample Output 1

trans

Sample Input 2

8 23 5 7

Sample Output 2

cis

Comments

There are no comments at the moment.