Submission
Status:
[PPPPPPPP]
Subtask/Task Score:
{100/100}
Score: 100
User: SXLENG.S
Problemset: สตริงซ้ำซ้ำ
Language: cpp
Time: 0.002 second
Submitted On: 2025-12-13 17:33:03
#include <iostream>
#include <string>
using namespace std;
int main() {
string s1,s2;
cin>>s1>>s2;
bool box[123] = {0};
for (int i=0;i<s1.length();i++){
box[s1[i]] = true;
}
for (int i=0;i<s2.length();i++){
if (box[s2[i]] == true){
cout<<s2[i]<<" ";
box[s2[i]]=0;
}
}
}