Submission
Status:
[PPPPPPPP]
Subtask/Task Score:
{100/100}
Score: 100
User: boygunner
Problemset: สตริงซ้ำซ้ำ
Language: cpp
Time: 0.004 second
Submitted On: 2026-09-30 21:33:07
#include<bits/stdc++.h>
using namespace std;
int main(){
string st1,st2,fst;
cin>>st1>>st2;
int len1=st1.length();
int len2=st2.length();
for(int i=0;i<len1;i++)
{
for(int j=0;j<len2;j++)
{
if(st1[i]==st2[j]){
if(fst.find(st1[i])==string::npos)
cout<<st1[i]<<' ';
fst=fst+st1[i];
break;
}
}
}
}