Comparing Plants
문제
Hazel the botanist visited a special exhibition in the Singapore Botanical Gardens. In this exhibition, plants of distinct heights are placed in a circle. These plants are labelled from to in clockwise order, with plant beside plant .
For each plant (), Hazel compared plant to each of the next plants in clockwise order, and wrote down the number denoting how many of these plants are taller than plant . Thus, each value depends on the relative heights of some consecutive plants.
For example, suppose , and . The next plants in clockwise order from plant would be plant and plant . If plant was taller than plant and plant was shorter than plant , Hazel would write down .
You may assume that Hazel recorded the values correctly. Thus, there is at least one configuration of distinct heights of plants consistent with these values.
You were asked to compare the heights of pairs of plants. Sadly, you do not have access to the exhibition. Your only source of information is Hazel's notebook with the value and the sequence of values .
For each pair of different plants and that need to be compared, determine which of the three following situations occurs:
- Plant is definitely taller than plant : in any configuration of distinct heights consistent with the array we have .
- Plant is definitely shorter than plant : in any configuration of distinct heights consistent with the array we have .
- The comparison is inconclusive: neither of the previous two cases applies.