Submission

Status:

[PPPPPPPP]

Subtask/Task Score:

{100/100}

Score: 100

User: Aoon

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

Language: cpp

Time: 0.004 second

Submitted On: 2026-09-26 22:02:54

#include<iostream>
using namespace std;
int main(){
    string a, b;
    cin >> a >> b;
    bool inA[128] = {}, inB[128] = {};
    for (char c : a) inA[c] = true;
    for (char c : b) inB[c] = true;
    for (int c = 0; c < 128; c++)
    if (inA[c] && inB[c]) cout << (char)c;
    cout << '\n';
    
    
    
}