diff options
Diffstat (limited to 'codechef/chefAndTheWildcardMatching/main.cpp')
| -rw-r--r-- | codechef/chefAndTheWildcardMatching/main.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/codechef/chefAndTheWildcardMatching/main.cpp b/codechef/chefAndTheWildcardMatching/main.cpp new file mode 100644 index 0000000..c00adb4 --- /dev/null +++ b/codechef/chefAndTheWildcardMatching/main.cpp @@ -0,0 +1,26 @@ +#include<bits/stdc++.h> + +using namespace std; + +int main () { + ios_base::sync_with_stdio(false); + cin.tie(NULL); + int tt; + cin >> tt; + while(tt--){ + string x; + string y; + cin >> x; + cin >> y; + bool ok = 1; + for(int i = 0; i < x.size(); i++) { + if(x[i] != '?' && y[i] != '?') { + if(x[i] != y[i]) { + ok = 0; + } + } + } + cout << (ok ? "Yes" : "No") << endl; + + } +} |
