아직 만들고 있는 페이지입니다.

이 페이지는 아직 만드는 중입니다. 보이는 내용은 바뀔 수 있습니다.

Deducing relationships

시간 제한1초메모리 제한1024 MB

요약
세 변수 a, b, c 사이의 관계 두 개가 주어질 때, 모든 순서쌍에 대해 유추 가능한 가장 강한 관계를 출력하고 모순이면 VASTUOLU를 출력한다.
난이도

보통10점 중 4점

유형
그래프, 유니온 파인드, 구현
정답자
아직 제출이 없습니다

문제

Let's consider equalities and inequalities between the numbers aa, bb, and cc. The relationships between the numbers can be expressed as a 3×33 \times 3 table, with two characters for each pair (x,y)(x, y) denoting their relationship as '<<', '≤', '==', '>=', '>>' (x<yx < y, x≤yx \le y, x=yx = y, x≥yx \ge y, x>yx > y, respectively), or '??' (if the relationship is not known and can't be deduced from the known ones).

The input contains two known equalities or inequalities and the program must fill the table with the strongest relationships that can be deduced from the input. This means that if it is possible to deduce that x<yx < y then the program must output '<<' in the corresponding cell of the table, and not '≤', even though x≤yx \le y also holds.

입력

The two lines of input each contain one relationship (equality or inequality).

출력

The output should contain exactly three lines of the table, where each cell of the table contains the strongest possible relationship that can be deduced, with the cells on each line spearated by spaces, or the message 'VASTUOLU', denoting a contradiction in the input.

예제2

  1. 예제 1

    입력
    a<=b
    b<<c
    
    예상 출력
    == <= <<
    >= == <<
    >> >> ==
    
  2. 예제 2

    입력
    a<<b
    b<=a
    
    예상 출력
    VASTUOLU