#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <algorithm>
#include <string>
#include <cstring>
#include <vector>
#include <map>
#include <queue>
using namespace std;
int book[1000]={0};
int main()
{
// freopen("in.txt","r",stdin);
queue<char> q1,q2;
char ch;
while( (ch=getchar())!='\n' )
q1.push(ch);
while( (ch=getchar())!=EOF )
{
if(ch=='\n')//吸收掉最后一个回车键,虽然不加对此题也没有影响,但是最好加上
break;
q2.push(ch);
}
while(!q1.empty())
{
if(q1.front()!=q2.front())
{
int t=q1.front();
if(q1.front()>='a' && q1.front()<='z')
t=t-32;
if(book[t]==0)
{
printf("%c",t);
book[t]++;
}
q1.pop();
}
else
{
q1.pop();
q2.pop();
}
}
return 0;
}
1084. Broken Keyboard (20)
最新推荐文章于 2021-08-21 19:22:40 发布