Help me with SAMESTR problem

what testcases does the below code fail to get correct?

include <bits/stdc++.h>
using namespace std;
define ll long long

int main() {

int t;
cin >> t;
while(t--)
{
    ll n;
    cin >> n;

    string s;
    cin >> s;

    unordered_map<ll,ll> mp;

    for(int i = 0; i<n;i++)
    {
        if(s[i] == '0') mp[0]++;
        else mp[1]++;
    }

    int ct = 0;
    unordered_set<int> k;

    int x = mp[0];
    int y = mp[1];

    k.insert(x);
    k.insert(y);


    int ct1 = 0;
    while(x + 2*ct1 <= n && (x + 2*ct1) >=1)
    {
        k.insert(x + 2*ct1);
        ct1++;
    }

    int ct2 = 0;

    while(y + 2*ct2 <= n && (y + 2*ct2) >=1)
    {
        k.insert(y + 2*ct2);
        ct2++;
    }

    int ans = k.size();
    cout << ans << '\n';
}

}