-
Notifications
You must be signed in to change notification settings - Fork 0
/
pu++_23_08_2020.cpp
53 lines (50 loc) · 989 Bytes
/
pu++_23_08_2020.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#include <bits/stdc++.h>
#include<vector>
#include<string.h>
#include<map>
using namespace std;
void check(vector<char> s, vector<char> t){
map<char, char>m;
bool a;
for(int i = 0; i<s.size(); i++){
if(s.at(i) == t.at(i)){
m.insert(make_pair(s.at(i),s.at(i)));
}
if(s.at(i) == "*"){
a = true;
}
}
if(!a){
bool b;
for(int i = 0; i<t.size(); i++){
int cont1 = 0;
itr = m.find(t.at(i))
if(itr != m.end()){
cont1++;
}else{
b = true;
}
}
if(b){
cout<<"NO";
}else{
cout<<"YES";
}
}else{
cout<<"YES";
}
}
int main(){
int n, m;
cin>>n>>m;
vector<char> s,t;
string c, h;
cin>>c;
for(int i = 0; i<n; i++){
s.push_back(c[i]);
}
cin>>h;
for(int i = 0; i<m; i++){
t.push_back(h[i]);
}
}