Submission
Status:
[PPPPPP-S]
Subtask/Task Score:
{0/100}
Score: 0
User: Punnavich
Problemset: สตริงซ้ำซ้ำ
Language: cpp
Time: 0.004 second
Submitted On: 2026-09-24 12:39:29
#include <bits/stdc++.h>
using namespace std;
int main() {
string x;
string y;
cin>>x;
cin>>y;
for(int i=0;i<x.length();i++){
for(int j=0;j<y.length();j++){
if(x[i]==y[j]){
cout<<x[i]<<" ";
y[j] = '!';
break;
}
}
}
}