Submission

Status:

[PPPPPPPP]

Subtask/Task Score:

{100/100}

Score: 100

User: rice_ot

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

Language: cpp

Time: 0.002 second

Submitted On: 2025-10-14 10:47:14

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

int main(){

    string x, y; cin>>x>>y;
    map<char, int> wordX;
    map<char, int> wordY;
    for(auto i : x){
        wordX[i]++;
    }
    for(auto i : y){
        wordY[i]++;
    }

    for(auto& i : wordX){
        if(wordY[i.first] != 0) cout<<i.first<<" ";
    }
}