Submission
Status:
[PPPP-SSS]
Subtask/Task Score:
{0/100}
Score: 0
User: Sol2468
Problemset: สตริงซ้ำซ้ำ
Language: cpp
Time: 0.004 second
Submitted On: 2026-10-15 13:26:05
#include <bits/stdc++.h>
using namespace std;
string a ;
string b ;
int main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL) ;
vector<char> arr ;
cin >> a >> b ;
for(int i=0 ; i<a.size() ; i++){
if(find(b.begin(),b.end(),a[i])!=b.end())arr.push_back(a[i]) ;
}
for(char i : arr){
cout << i << ' ' ;
}
return 0 ;
}