Untitled

 avatar
unknown
plain_text
22 days ago
588 B
3
Indexable
#include <iostream>
using namespace std;

int main() {
    int t;
    cin >> t;
    int n;
    cin >> n;
    string arr[2*n];

    while(t != 0) {
        for(int i = 0; i < 2*n; i++) {
            char x;
            cin >> x;
            arr[i] = x;
        }
        t--;

        int S = 0;
        for (int i = 0; i < n; i++) {
            if( arr[i] =="W") {
                S++;
            }
        }
        if (S % 2 == 0) {
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }

    }
    return 0;
}
Editor is loading...
Leave a Comment