AlphabetsProblem code: DPC203 |
All submissions for this problem are available.
Alphabets
You are provided a set of characters forming an alphabet, arranged in increasing order of their weight. Write a program to sort a set of strings in ascending order using the provided alphabet. The sorted output is to be displayed on the screen.
Input:
First line contains the number of test cases. Each test case is separated by an empty line. Each test case contains the following inputs:
- Size of alphabet
- Characters in alphabet
- Strings to be sorted
Output:
For each test case, display the input strings in ascending order. Output of each test should be separated by an empty line.
Sample Input
2
26
ABCDEFGHIJKLMNOPQRSTUVWXYZ
ABCD
ABCFX
ABCE
26
ZYXWVUTSRQPONMLKJIHGFEDCBA
ABCD
ABCFX
ABCE
Sample Output
ABCD
ABCE
ABCFX
ABCFX
ABCE
ABCD
| Author: | rushikesh30 |
| Date Added: | 9-03-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

Please register at
Please register at http://bit.ly/DSPPC2_Register to claim prizes and certificates.
How do you expect us to know
How do you expect us to know when will the strings terminate and the next test cases start ...
how many string to sort???
how many string to sort???
Input is strange. Please
Input is strange. Please check. There are many blank lines :/
How can we find out when to
How can we find out when to start the other input ?
the persons who solved the
the persons who solved the prob. tell usĀ how did u manage to guess when the next string starts
Admin: The aim of this
Admin: The aim of this contest is to promote programming and not to adjudge the best programmers. We request the participants to maintain a Healthy Competition. Any mal-practices if found will lead to Disqualification from the Series. If any such codes have been submitted consider submitting fresh codes.
can u please specify the
can u please specify the constraints!! for the problem.
i am not able to provide the
i am not able to provide the input to problem....i checked by removing all the processing and jst takin the input still codechef reports a time limit excedeed error
the codes is running on my computer in code blocks and it is takin multiple inputs well from a file as well as keyboard !!!!
I had added following
I had added following line:
if( clock()/CLOCKS_PER_SEC >2) return 0;
but also it is giving TLE how?
i request to the
i request to the administration of codechef....plz rply.....
every1 is facing d same problem.....
the worst contest i have ever
the worst contest i have ever seen... sue the organisers... oooppsssss am one... :D :D :D
the ACTUAL INPUT CASE are same as the SAMPLE TEST CASES... how dumb of the organisers...
The CodeChef Rankings are not
The CodeChef Rankings are not accepted Directly. Some Mal-Practices have been observed and Strict action would be taken.
i dont think it is a
i dont think it is a MAL-PRACTISE .. outputing the SAMPLE TEST CASES is not A MAL-PRACTISE .......
IT IS SIMPLEST CODE ONE CAN WRITE...... :D
WITH MINIMUM TIME COMPLEXITY OF O(1) and MEMORY REQUIREMENT........
it is only the organisers u can blame... and i feel sorry for CODECHEF for letting such type of contests to run... at such a gud platform..
very sad for organizers, they
very sad for organizers, they even tell what are the test cases for the contest.
Eliminate all those who submitted the solution for this problem