Submission
Status:
[PPPPPPPP]
Subtask/Task Score:
{100/100}
Score: 100
User: vachirasawin
Problemset: สตริงซ้ำซ้ำ
Language: cpp
Time: 0.002 second
Submitted On: 2026-03-13 16:10:07
// grader-chan
// c1_bkk67_2.cpp | c1_bkk67_2
#include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
string word1, word2;
cin >> word1 >> word2;
set<char> cmp;
for (char &i : word1) {
for (char &j : word2) {
if (i == j) cmp.insert(i);
}
}
for (auto &i : cmp) {
cout << i << " ";
}
return 0;
}