fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. #define ll long long
  4. const ll MOD = 1e9 + 7;
  5. const double PI = 3.14159265358979323846;
  6.  
  7. signed main() {
  8. ios::sync_with_stdio(false);
  9. cin.tie(nullptr);
  10.  
  11. ll t = 1, n, m, k, a, b, c, d, e, f, w, h, x1, x2, y2, l, r, y, z, q;
  12. string s, x;
  13. //char x, y;
  14. cin >> t;
  15. while (t--) {
  16. cin >> n >> s >> x;
  17. if (x.find('o') != string::npos) cout << "YES\n";
  18. else cout << "NO\n";
  19. }
  20.  
  21. return 0;
  22. }
Success #stdin #stdout 0.01s 5316KB
stdin
Standard input is empty
stdout
NO