|시간 제한||메모리 제한||제출||정답||맞은 사람||정답 비율|
|2 초||256 MB||49||12||12||28.571%|
Andy loves anagrams. For the uninitiated, an anagram is a word formed by rearranging the letters of another word, for example rasp can be rearranged to form spar. Andy is interested to know if two words are almost anagrams. A word is almost an anagram of another word if:
Your job is to help Andy to determine if two words are identical, anagrams, almost anagrams or nothing like each other.
The input contains a single test case.
The input will be a single line of text containing a pair of words separated by a single space. The words will be in lower case and will contain alphabetic characters only. Words will contain between 1 and 1000 letters inclusive.
Your program should produce one line of output as follows:
If the words are identical, output: worda is identical to wordb
If the words are anagrams, output: worda is an anagram of wordb
If the words are almost anagrams, output: worda is almost an anagram of wordb
Otherwise, output: worda is nothing like wordb
In all cases the first word in the output sentence must be the shorter word or if the words are the same length the first word must be the lexicographically least.
rasp is an anagram of spar
able is almost an anagram of table
sable is almost an anagram of table