Submission
Status:
[PPPPPPPP]
Subtask/Task Score:
{100/100}
Score: 100
User: cjqwerty
Problemset: สตริงซ้ำซ้ำ
Language: cpp
Time: 0.003 second
Submitted On: 2025-10-01 10:34:31
#include<iostream>
using namespace std;
int main(){
string str1;
string str2;
bool box[123]={false};
cin>>str1>>str2;
for(int i=0;i<str1.length();i++){
box[str1[i]]=true;
}
for(int i=0;i<str2.length();i++){
if(box[str2[i]] == true){
cout<<char(str2[i])<<" ";
}
box[str2[i]]=false;
}
return 0;
}