mirror of
https://github.com/xlucn/PAT.git
synced 2026-10-31 06:37:38 +08:00
21 lines
1.1 KiB
HTML
21 lines
1.1 KiB
HTML
<!DOCTYPE html>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
|
<h1>1050. String Subtraction (20)</h1>
|
|
<div id="problemContent">
|
|
<p>Given two strings S<sub>1</sub> and S<sub>2</sub>, S = S<sub>1</sub> - S<sub>2</sub> is defined to be the remaining string after taking all the characters in S<sub>2</sub> from S<sub>1</sub>. Your task is simply to calculate S<sub>1</sub> - S<sub>2</sub> for any given strings. However, it might not be that simple to do it <i>fast</i>.</p>
|
|
<p><b>
|
|
Input Specification:
|
|
</b></p>
|
|
<p>Each input file contains one test case. Each case consists of two lines which gives S<sub>1</sub> and S<sub>2</sub>, respectively. The string lengths of both strings are no more than 10<sup>4</sup>. It is guaranteed that all the characters are visible ASCII codes and white space, and a new line character signals the end of a string.</p>
|
|
<p><b>
|
|
Output Specification:
|
|
</b></p>
|
|
<p>For each test case, print S<sub>1</sub> - S<sub>2</sub> in one line. </p>
|
|
<b>Sample Input:</b><pre>
|
|
They are students.
|
|
aeiou
|
|
</pre>
|
|
<b>Sample Output:</b><pre>
|
|
Thy r stdnts.
|
|
</pre>
|
|
</div> |