AnagramProblem code: CS01 |
Problem text... An anagram is a word or phrase formed by rearranging the letters of another word or phrase. For example, carthorse is an anagram of orchestra . Blanks within a phrase are ignored in forming anagrams. Thus, orchestra and horse cart are also anagrams. Write a program that read a list of phrases and prints all pairs of anagrams occurring in the list.
Input
Input description... The Input file will contain a single integer at the first line of the input, indicate the number of test case you need to test followed by a blank line. Each test case will consist of from 1 to 100 lines. A completely empty or blank line signals the end of a test case. Each line constitutes one phrase.
Output
Output description... Some number of lines (including possibly 0 if there are no anagrams in the list), each line containing two anagrammatic phrases separated by = . Each anagram pair should be printed exactly once, and the order of the two phrases within a printed pair must be lexicographic, as well as the first phrases and the second ones in case some first are equal. Two consecutive outputs for two consecutive inputs is separated by a single blank line.
Example
Input: 1 carthorse horse horse cart i do not know u ok i now donut orchestra Output: carthorse = horse cart carthorse = orchestra horse cart = orchestra i do not know you = ok i now donut
| Author: | rushikesh30 |
| Date Added: | 14-02-2010 |
| Time Limit: | 5 sec |
| Source Limit: | 50000 Bytes |
| Languages: | ADA, ASM, BASH, BF, C, C99 strict, CAML, CLOJ, CLPS, CPP 4.0.0-8, CPP 4.3.2, CS2, D, ERL, F#, FORT, GO, HASK, ICK, ICON, JAR, JAVA, JS, LISP clisp, LISP sbcl, LUA, NEM, NICE, PAS fpc, PAS gpc, PERL, PERL6, PHP, PIKE, PRLG, PYTH, PYTH 3.1.2, RUBY, SCALA, SCM guile, SCM qobi, ST, TEXT, WSPC |
Comments

Fetching successful submissions

@Rushikesh deshpande is there
@Rushikesh deshpande
is there any partial mark or speed of programe will matter to decide ranking ?????
Please check whether
Please check whether submission is opened or not . I am getting 'This problem can't be tested Yet' error message.
yes execution time will
yes execution time will matter.You can be in touch from my email id rushikesh90@gmail.com
is the phrases contain only
is the phrases contain only small alphabet letters
can you please clarify as to
can you please clarify as to what is the end of a test case ? ? because simply accepting the input is also giving me tle inspite of taking care of an empty line sperating the test cases.
@admin... what will be the
@admin... what will be the output of
1
ab
ab ???
those who get there time
It will be better if you
It will be better if you increase the time limit, instead of letting us submit the solution again and again.
outputformat??? string1(spa
outputformat???
string1(space or not ??)=(space or not??)string2????
I incresed the time
I incresed the time limit.Thats why I am asking you to resubmit.