Submission

Status:

[PPPPPPPP]

Subtask/Task Score:

{100/100}

Score: 100

User: august

Problemset: สตริงซ้ำซ้ำ

Language: cpp

Time: 0.002 second

Submitted On: 2025-09-19 21:39:11

#include <bits/stdc++.h>
using namespace std;

int main() {
    cin.tie(0)->sync_with_stdio(0);
    bool a[256]={};
    string s1, s2;
    cin>> s1>> s2;

    for (auto x : s1) a[x] = 1;
    for (auto x : s2) {
        if (a[x]) {
            cout<< x<< " ";
            a[x] = 0;
        }
    }
}