Submission
Status:
[PPPPPPPP]
Subtask/Task Score:
{100/100}
Score: 100
User: zenta4u
Problemset: สตริงซ้ำซ้ำ
Language: cpp
Time: 0.003 second
Submitted On: 2025-09-28 13:10:08
#include <iostream>
#include <algorithm>
#include <set>
using namespace std;
int main() {
string x,y;
set<char>z;
cin>>x>>y;
for(int i=0;i<x.length();i++){
for(int j=0;j<y.length();j++){
if(x[i]==y[j]){
z.insert(x[i]);
}
}
}
for(char set:z){
cout<<set<<" ";
}
}