Editorial for SAC '22 Code Challenge 3 Junior P2 - Normal Lines


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: maxcruickshanks

There are 3 cases that need to be considered:

If the x-coordinates are identical, they are parallel to the y-axis, so output y-axis;

If the y-coordinates are identical, they are parallel to the x-axis, so output x-axis;

If neither condition above is satisfied, output neither since they are not parallel to either axis.

Time Complexity: \mathcal{O}(1)


Comments

There are no comments at the moment.