Submit | All submissions | Best solutions | Back to list |
NAJD - Dictionary |
Your task is to make a simple dictionary.
You will be given a paragraph. It is guaranteed that no punctuation symbol will be given in the input except dot "." and there will be only one space between words.
Input
The first line of input is a integer T representing the number of test cases (T ≤ 10). Each test case begins with a number N represents the number of lines of the paragraph in that test case. (1 ≤ N ≤ 10).
Then N lines there is a text S. (1 ≤ |S| ≤ 10000).
Output
Output each word found in the paragraph only once in a lexicographical order. There will be a blank line between two cases. See the sample for clarity.
Example
Input: 2 3 dhaka city college. dhanmondi dhaka. bangladesh. 2 argentina argentina argentina. argentinaaaaaaaaa brazil. Output: Case #1: bangladesh city college dhaka dhanmondi Case #2: argentina argentinaaaaaaaaa brazil
Added by: | Najmuzzaman |
Date: | 2014-10-25 |
Time limit: | 0.5s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ADA95 ASM64 MAWK BC C-CLANG NCSHARP CPP14-CLANG COFFEE D-CLANG D D-DMD DART ELIXIR ERL FANTOM FORTH JULIA KTLN NIM OBJC OBJC-CLANG OCT PICO PROLOG PYPY3 R RACKET RUST SCALA SCM guile SCM qobi CHICKEN SED ST SQLITE SWIFT UNLAMBDA WHITESPACE |
hide comments
2015-03-13 18:17:54 unknown1
21566. Dictionary in the test case two "Case" or "case"??? |
|
2015-03-13 16:20:46 Imran Ziad
in sample test case 2, for N=3, I think there should be 3 lines except 2. ans: Now the Sample is change 2. Last edit: 2015-03-13 17:22:08 |