国产探花免费观看_亚洲丰满少妇自慰呻吟_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;}


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 乌鲁木齐市| 曲水县| 台南县| 佛山市| 麟游县| 米林县| 南安市| 龙门县| 鹿邑县| 双鸭山市| 仁寿县| 阳原县| 洱源县| 汉阴县| 新竹市| 克东县| 谢通门县| 绥德县| 普兰县| 鹤岗市| 永登县| 吉安县| 建湖县| 洞头县| 温泉县| 湖北省| 房产| 西昌市| 丰台区| 裕民县| 巍山| 呼和浩特市| 普兰县| 岳池县| 济源市| 微博| 东兰县| 图们市| 本溪| 辽宁省| 溆浦县|