Submission
Status:
[PPPPPPPPPPPPPPPPPPPP]
Subtask/Task Score:
{100/100}
Score: 100
User: Frankenstein
Problemset: B.Shuffle
Language: cpp
Time: 0.061 second
Submitted On: 2026-04-12 15:50:30
#include <bits/stdc++.h>
using namespace std;
int main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int T; cin >> T;
while(T--){
int M; string S;
cin >> M >> S;
vector<int> pos;
for(int i = 0; i < (int)S.size(); i++)
if(S[i] != '_') pos.push_back(i);
int xr = 0;
for(int i = 0; i + 1 < (int)pos.size(); i += 2){
int gap = pos[i+1] - pos[i] - 1;
xr ^= (gap & 1);
}
cout << (xr ? "YES" : "NO") << '\n';
}
}