Submission
Status:
[PPPPPPPP]
Subtask/Task Score:
{100/100}
Score: 100
User: 666whynot
Problemset: สตริงซ้ำซ้ำ
Language: cpp
Time: 0.002 second
Submitted On: 2025-10-03 20:57:34
#include <bits/stdc++.h>
using namespace std;
int main(){
ios::sync_with_stdio(false);cin.tie(nullptr);
string s1,s2;cin >> s1 >> s2;
set<char> v = {};
set<char> s11,s22;
for(char e:s1)s11.insert(e);
for(char e:s2)s22.insert(e);
for(char e:s11){
for(char a:s22){
if(a == e)v.insert(a);
}
}
for(auto e:v)cout << e << ' ';
}