#include "iostream"
#include "string.h"
using namespace std;
int main() {
string s1, s2;
int t;
cin >> t;
while(t--) {
cin >> s1 >> s2;
if(s1[0] == 'b' || s2[0] == 'b') {
if(s1[1] == 'b' || s2[1] == 'b') {
if(s1[2] == 'o' || s2[2] == 'o')
cout << "yes" << endl;
else
cout << "no" << endl;
}
else if(s1[1] == 'o' || s2[1] == 'o') {
if(s1[2] == 'b' || s2[2] == 'b')
cout << "yes" << endl;
else
cout << "no" << endl;
}
else
cout << "no" << endl;
}
else if(s1[0] == 'o' || s2[0] == 'o') {
if(s1[1] == 'b' || s2[1] == 'b') {
if(s1[2] == 'b' || s2[2] == 'b')
cout << "yes" << endl;
else
cout << "no" << endl;
}
else
cout << "no" << endl;
}
else
cout << "no" << endl;
}
return 0;
}
↧
August Challenge - SPELLBOB Whats wrong in my code?
↧