Submission
Status:
[PPPP-SSS]
Subtask/Task Score:
{0/100}
Score: 0
User: scxtti3h
Problemset: สตริงซ้ำซ้ำ
Language: cpp
Time: 0.003 second
Submitted On: 2025-12-10 19:37:28
/*
AUTHOR : Scxtti3h
Task : c1_bkk67_2
Date : 10/12/2568
*/
#include <bits/stdc++.h>
using namespace std;
int main(){
string a,b,c;
int x,y,z=0;
cin >> a;
cin >> b;
x=a.length();
y=b.length();
for(int i=0;i<x;i++){
for(int j=0;j<y;j++){
if(a[i]==b[j]){
c.push_back(a[i]);
z++;
}
}
}
c.erase(unique(c.begin(), c.end()), c.end());
for(int k=0;k<c.length();k++){
cout << c[k] << " ";
}
return 0;
}