80. Compare Two Strings
Read two lines and compare them in dictionary order, character by character.
Print:
- -1 if the first line comes before the second
- 0 if they are identical
- 1 if the first line comes after the second
Comparison is by ASCII value, so all uppercase letters come before all lowercase ones. When one string is a prefix of the other, the shorter one comes first.
Constraints - Each line has between 1 and 100000 characters. - Printable ASCII only.
Input
Two lines, each containing one string.
Output
Print -1 if the first string comes before the second, 1 if it comes after, or 0 if they are equal.
Hints
Four rungs, in order. The last two open once you have submitted an attempt. A wrong one counts.