http://codeforces.com/contest/909/problem/A
According to the problem statements, you need to consider all the characters in the first name, and only the first character in the last name.
(1) Take “harry potter”for example ① You got“hp” ② You got “hap”, which is less than “hp” ③ You got “harp”,which is greater than “hap” So, the answer is “hap”
(2) Take“ertuyivhfg v”for example ① You got “ev” ② You got “erv”, which is less than “ev” ③ You got “ertv”, which is less than “erv” ④ You got “ertuv”, which is less than “ertv” ⑤ You got “ertuyv”, which is greater than “ertuv” So, the answer is “ertuv”
更多内容请关注微信公众号
