Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- int main() {
- int t;
- cin>>t;
- while(t--)
- {
- int n;
- cin>>n;
- string s;
- cin>>s;
- int c=0;
- for(char ch:s) if(ch=='U') c++;
- if(c%2==1) cout<<"YES"<<endl;
- else cout<<"NO"<<endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement