Submission
Status:
[PPPP-SSS]
Subtask/Task Score:
{0/100}
Score: 0
User: Lyronseir
Problemset: สตริงซ้ำซ้ำ
Language: cpp
Time: 0.002 second
Submitted On: 2025-12-13 19:28:01
#include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
string a, b;
cin >> a >> b;
bool alrdone;
for (int i = 0;i < a.size();++i) {
alrdone = false;
for (int j = 0;j < b.size();++j) {
if (b[j] == a[i] and alrdone == false) {
cout << a[i] << " ";
alrdone = true;
}
}
}
}