国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 開發設計 > 正文

1050. String Subtraction

2019-11-08 02:17:52
字體:
來源:轉載
供稿:網友

Given two strings S1 and S2, S = S1 - S2 is defined to be the remaining string after taking all the characters in S2 from S1. Your task is simply to calculate S1 - S2 for any given strings. However, it might not be that simple to do it fast.

Input Specification:

Each input file contains one test case. Each case consists of two lines which gives S1 and S2, respectively. The string lengths of both strings are no more than 104. 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.

Output Specification:

For each test case, PRint S1 - S2 in one line.

Sample Input:
They are students.aeiouSample Output:

Thy r stdnts.

#include <cstdio>#include <cstdlib>#include <iostream>#include <deque>#include <queue>#include <cstring>#include <vector>#include <string>#include <iomanip>#include <cmath>#include <algorithm>using namespace std;#define max1 10001#define inf 6000int main(){    string a,b;    int g[1000],i;    getline(cin,a);    getline(cin,b);    for(i=0;i<b.length();i++)        g[b[i]]=1;    for(i=0;i<a.length();i++)    {        if(g[a[i]]!=1)            cout<<a[i];    }    return 0;}


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 桂平市| 开阳县| 武强县| 宜君县| 虞城县| 赞皇县| 桂东县| 陆良县| 道真| 阿巴嘎旗| 迁西县| 沧源| 都安| 鸡西市| 勃利县| 西吉县| 凤冈县| 宣武区| 邻水| 射阳县| 渭源县| 平和县| 揭西县| 微博| 井研县| 乐都县| 鹿泉市| 中卫市| 日喀则市| 石林| 洪江市| 常州市| 长治市| 冕宁县| 桓台县| 伊吾县| 开阳县| 淮阳县| 安康市| 景谷| 盐亭县|