#55121: 抱歉,前面少一個等於,這一版是AC


yp11451099@yphs.tp.edu.tw (703-30邱冠博)


#include<iostream>
#include<string>
using namespace std;
int main()
{
    string s,t;
    bool f;
    while(cin>>s>>t)
    {
        for(int i=0;i<t.size();i++)
        {
            f=false;
            for(int j=0;j<s.size();j++)
                if(t[i]==s[j])   {cout<<j+1<<' ';s[j]=' ';f=true;break;}
                if(f==false) cout<<"X ";
        }
        cout<<'\n';
    }
}