Help me in solving TTENIS problem

My issue

My code

#include <iostream>
using namespace std;

int main() {
    int t;
    cin>>t;
    while(t--){
        string s;
        cin>>s;
        int n=s.length();
        if(s[n-1]=='1'){
            cout<<"win"<<endl;
        }
        else{
            cout<<"lose"<<endl;
        }
    }
	return 0;
}

Problem Link: TTENIS Problem - CodeChef

@agrawalvaishal
Your logic is not right
U have to count 1’s and 0’s and if count of 1’s reaches 11 and count of 0’s <10 then print win
else if when both become 10 then u have to take difference of two the player that made first two consecutive wins will be the winner .