Please help me with this code (TTENIS)

Here is my code: Solution
The expected output is also produced and the limits of the variables is also satisfied. The output format is also correct. Is it that we don’t have to print leading zeros? Please help me with the code.
Thanks a lot!

If last character of string is 1 then chef wins

Here is an easy soln for it

You can look at the editorial for full detail

using namespace std;
int main() 
    int t;    
    while (t--)    
        string s;    
        cin >> s;    
        cout << (s[s.length()-1] == '1' ? "WIN\n" : "LOSE\n");    

Dear, please read input constraints explicitly. The length of string (i.e. number of matches) can be upto 100.

So your if-else conditions-

				else if(chef==11&&opp<11&&!flag)
				else if(opp==11&&chef<11&&!flag)

Will all malfunction. I think your code would print nothing for cases when S~100, although I didnt check that.