Submission
Status:
[PPPPPPPP]
Subtask/Task Score:
{100/100}
Score: 100
User: HawThorns
Problemset: สตริงซ้ำซ้ำ
Language: cpp
Time: 0.003 second
Submitted On: 2026-10-13 15:23:28
#include <iostream>
#include <algorithm>
#include <set>
using namespace std;
int main(){
string input,input2;
cin >> input >> input2;
set<char> toout1,toout2,toprint;
for(const char &a :input)
toout1.insert(a);
for(const char &b :input2)
toout2.insert(b);
for(const char &a :input)
{
for(const char &b:input2){
if(a == b){
toprint.insert(a);
break;
}
}
}
for(const char &a :toprint)
cout << a << " ";
return 0;
}