For this Question: The underage Harry and Cedric reach the Triwizard Cup together in the hedge maze, which turns out to be a portkey that transports them to a graveyard where Pettigrew and Voldemort are waiting. After Pettigrew murders Cedric with the Killing Curse on Voldemort's order, Voldemort challenges Harry with a very tricky spell, <b>The string leviosa</b>.

In order to survive this spell, Harry has to answer the following question:
There is a string of size N consisting of characters A, B, and C. The character A can be transformed to either character B or character C. Now, two players play a game with the following rules turn wise. In each turn, the player with the turn chooses a position with character A in the string and transforms the character to another character (B or C). The only restriction to the string is that there can't be two consecutive <b>B</b>s or two consecutive <b>C</b>s in the string. The player who cannot make a move loses. Which player wins the game?

Can you help Harry in surviving the dangerous spell?The first line of the input contains a single integer N, the length of the string.
The second line of the input contains N characters of the string.

Constraints
1 <= N <= 100000
The characters in the string are restricted to A, B, and C.
There are no consecutive Bs or Cs in the input string.Output "Player1" if the player who starts the game wins, else output "Player2" (without quotes).Sample Input
3
ACA

Sample Output
Player2

Explanation: Player1 changes the first or the last character to B, the second player changes the remaining A to B in the next turn. After that, player1 cannot make a move since there are no more As in the string.

Sample Input
4
BACA

Sample Output
Player1

Explanation: Player1 changes the last character in the string to B and player2 cannot make a move further., I have written this Solution Code: #include <bits/stdc++.h>
using namespace std;
#define sd(x) scanf("%d", &x)
#define sz(v) (int) v.size()
#define pr(v) For(i, 0, sz(v)) {cout<<v[i]<<" ";} cout<<endl;
#define slld(x) scanf("%lld", &x)
#define all(x) x.begin(), x.end()
#define For(i, st, en) for(int i=st; i<en; i++)
#define tr(x) for(auto it=x.begin(); it!=x.end(); it++)
#define fast std::ios::sync_with_stdio(false);cin.tie(NULL);
#define pb push_back
#define ll long long
#define ld long double
#define int long long
#define double long double
#define mp make_pair
#define F first
#define S second
typedef pair<int, int> pii;
typedef vector<int> vi;
#define pi 3.141592653589793238
const int MOD = 1e9+7;
const int INF = 1LL<<60;


const int N = 2e5+5;

// it's swapnil07 ;)
 
#ifdef SWAPNIL07
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1>
void __f(const char* name, Arg1&& arg1){
    cout << name << " : " << arg1 << endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args){
    const char* comma = strchr(names + 1, ',');cout.write(names, comma - names) << " : " << arg1<<" | ";__f(comma+1, args...);
}
int begtime = clock();
#define end_routine() cout << "\n\nTime elapsed: " << (clock() - begtime)*1000/CLOCKS_PER_SEC << " ms\n\n";
#else
#define endl '\n'
#define trace(...)
#define end_routine()
#endif


void solve(){
    int n;
    string s;
    cin >> n >> s;

    assert(sz(s)==n);
    
    int l = 0, r = 1;
    int ans = 0;
    while (l < n) {
        while (l < n && s[l] != 'A') ++l, ++r;
        while (r < n && s[r] == 'A') ++r;
 
        if (l == 0 && r == n) {
            ans ^= n % 2;
        }
        else if (r == n || l == 0) {
            ans ^= r - l;
        }
        else if (r < n && s[l - 1] == s[r]){
            ans ^= 1;
        }
        l = r;
    }
    cout << (ans ? "Player1" : "Player2");
}


signed main()
{
    fast
    #ifdef SWAPNIL07
        freopen("input.txt","r",stdin);
        freopen("output.txt","w",stdout);
    #endif
    int t=1; 
    // cin>>t;
    while(t--){
        solve();
        cout<<"\n";
    }
    return 0;
}

, In this Programming Language: C++, Now tell me if this Code is compilable or not?