Deducing relationships
Time limit1sMemory limit1024 MB
Given two relations among a, b, and c, fill the 3x3 table with the strongest relation deducible for each pair, or print VASTUOLU if they contradict.
- Level
Easy3 of 10
- Topics
- Brute force, Implementation
- Solved
- No attempts yet
Problem
Consider equalities and inequalities between the numbers , , and . The relationships between the numbers can be shown in a table. Each pair has a two-character cell that is one of << (), <= (), == (), >= (), >> (), or ?? if the relationship is unknown and cannot be deduced from the known ones.
The input gives two known equalities or inequalities. Fill the table with the strongest relationships that can be deduced from them. If can be deduced, write << in that cell, not <=, even though also holds.
Input
Two lines, each containing one equality or inequality.
Output
Print exactly three lines of the table, with the cells on each line separated by spaces. Each cell holds the strongest relationship that can be deduced. If the input is contradictory, print VASTUOLU instead.