Submit | All submissions | Best solutions | Back to list |
HS11STRM - String manipulation |
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 specification
An 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 specification
Output t strings, one string in each line according to the problem specification.
Example 1
Input: 7 whose shoe is the dirty shoe please go out and wash your dirty shoe Output: w is dirty please out wash dirty
Example 2
Input: 4 five potato six potato seven potato more potato Output: five six seven mre
Scoring
By solving this problem you score 10 points.
Added by: | kuszi |
Date: | 2011-10-15 |
Time limit: | 0.200s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | ADA95 ASM32 ASM64 BASH BF C CSHARP C++ 4.3.2 CPP C99 CLPS LISP sbcl LISP clisp D ERL FSHARP FORTRAN GO HASK ICON JAVA JS-RHINO LUA NEM NICE OCAML PAS-GPC PAS-FPC PERL PHP PIKE PRLG-swi PYTHON PYTHON3 RUBY SCALA SCM guile SCM qobi ST TCL WHITESPACE |
Resource: | High School Programming League |
hide comments
2012-06-05 15:12:03 kuszi
@Neeraj Bhat "0" is clickable |
|
2012-04-13 16:29:53 Neeraj Bhat
0 (limit: 2) what is it? my code works well on my system.... Last edit: 2012-04-14 17:38:18 |