1033 旧键盘打字 (20 分)

兄弟题1084 Broken Keyboard (20 分),一样的水~。

ps:`当按键都没坏的时候,输入可能为空,要用getline而不能用cin。

bool vis[200];
string a,b;

int main()
{
    getline(cin,a);
    getline(cin,b);
    
    for(auto t:a) vis[t]=true;
    for(auto t:b)
        if(isupper(t) && vis['+'])
            continue;
        else if(!vis[toupper(t)])
            cout<<t;
    cout<<endl;
    //system("pause");
    return 0;
}
posted @ 2021-02-17 17:13  Dazzling!  阅读(19)  评论(0编辑  收藏  举报