Submission
Status:
[PPPPP-SS]
Subtask/Task Score:
{0/100}
Score: 0
User: chs_14
Problemset: สตริงซ้ำซ้ำ
Language: cpp
Time: 0.003 second
Submitted On: 2025-11-30 08:56:37
#include <bits/stdc++.h>
using namespace std;
int main() {
cin.tie(0)->sync_with_stdio(0);
map<char, int> wordcount;
string strmin, strmax;
{
string str1, str2;
cin >> str1 >> str2;
if (str1.size() >= str2.size()) {
strmax = str1;
strmin = str2;
}
else {
strmax = str2;
strmin = str1;
}
}
for (char &c : strmin)
{
for (char &d : strmax)
{
if (c==d) {
cout << c << ' ';
break;
}
}
}
}