Submission
Status:
[PPPPPPPP]
Subtask/Task Score:
{100/100}
Score: 100
User: Quinruj
Problemset: สตริงซ้ำซ้ำ
Language: cpp
Time: 0.003 second
Submitted On: 2025-09-17 20:05:57
#include <bits/stdc++.h>
using namespace std;
int main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
string a,b;cin>>a>>b;
unordered_map<char,bool> mp,out;
for (auto i : a){
mp[i] = true;
}
for (auto i : b){
if (mp[i] && !out[i]) cout << i << ' ';
out[i] = true;
}
}