CT618

Brass letters Lex Order

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

The registry keeper Tina has been asked to verify the safety inspections. On the desk lies a long table of letters readings. Task: Compare s and t lexicographically: print -1 if s<t, 0 if s==t, 1 if s>t. Input format: Two lines: string s, then string t. Output format: Print -1, 0, or 1. Constraints: 1 <= |s|,|t| <= 141.

Example 1:

Input: wenljkhccvgljkmdrvfgpphhsnnswpnjatqnpyxazqxlegcorwvczuqoemshrteojvcz eksmspksdylfomaffjpmvfcvj
Output: 1

Example 2:

Input: nllhtexgztqckyvuvmmiquxrexlgcyqcqmrbscpodlzsceuzhumcbtqvmxfvgsqlkiqncwqfbx emdgktzdtanwonuubutljpekwnqzidqtkyrvfqaopzufhgolilgogrstkffnhpyzvcqdyu
Output: 1

Example 3:

Input: moexddsyzkpfwvlshxnkkpwfyppqvrjmhsbuhrlpayoi gynotvreztfdiglenjdlbqwjycmzozbzlykruzjqxvseupsdszfavmrazryovpdsbwwfekxzuxlakxezpwofkufigwjcbmqpe
Output: 1

Constraints:

1 <= |s|,|t| <= 141.

Loading...
Test Cases:No test cases
No test cases available.