|
|||||||||||||||||||
|
SPOJ time: 2012-05-25 02:42:21 |
String manipulationProblem code: HS11STRM
You are given two strings: str1 and str2. For each successive letter from str2, remove its first occurrence in str1. Do nothing if a given letter from str2 does not exist in str1. Input data specificationAn integer t, 1<=t<=100, denoting the number of testcases, followed by t lines. Each line consists of two strings separated by a whitespace. Strings consist of lower-case letters from the Latin alphabet. The size of the whole test is limited by 1MB. Output data specificationOutput t strings, one string in each line according to the problem specification. Example 1Input: 7 whose shoe is the dirty shoe please go out and wash your dirty shoe Output: w is dirty please out wash dirty Example 2Input: 4 five potato six potato seven potato more potato Output: five six seven mre ScoringBy solving this problem you score 10 points.
|
||||||||||||||||||
| |||||||||||||||||||