Submission
Status:
[PPPP-SSS]
Subtask/Task Score:
{0/100}
Score: 0
User: pann
Problemset: สตริงซ้ำซ้ำ
Language: cpp
Time: 0.002 second
Submitted On: 2026-10-02 06:23:45
#include <iostream>
#include <vector>
using namespace std;
int main(){
string a, b;
cin >> a >> b;
vector<char> dupe;
for (int i = 0; i < a.length(); i++){
for (int j = 0; j < b.length(); j++){
if (b[j] == a[i]){
dupe.push_back(b[j]);
break;
}
}
}
for (auto x: dupe){
cout << x << " ";
}
return 0;
}