Submission
Status:
[PPPPPPPP]
Subtask/Task Score:
{100/100}
Score: 100
User: ultraman9845
Problemset: สตริงซ้ำซ้ำ
Language: cpp
Time: 0.002 second
Submitted On: 2026-10-11 22:30:22
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
string s, s2;
cin >> s >> s2;
vector<ll> alp(128, 0);
for (auto e : s) {
alp[e]++;
}
vector<ll> alp2(128, 0);
for (auto e : s2) {
alp2[e]++;
}
for (int i = 0; i < 128; i++) {
if (alp[i] > 0 && alp2[i] > 0) {
cout << char(i) << " ";
}
}
return 0;
}