Submission

Status:

[PPPPPPPP]

Subtask/Task Score:

{100/100}

Score: 100

User: NovemNotes

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

Language: cpp

Time: 0.003 second

Submitted On: 2025-09-28 15:29:22

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

int main(){
    ios_base::sync_with_stdio(false);cin.tie(NULL);
    string s;cin >> s;
    unordered_set<char> c;
    for(auto &x:s)c.insert(x);
    cin >> s;
    unordered_set<char> tmp;
    for(auto &x:s)tmp.insert(x);
    for(auto &x:c){
        if(tmp.find(x)!=tmp.end()){
            cout << x << "\n";
        }
    }
    return 0;
}