Problem Description: Arif likes to play volley ball. He found some statistics of matches which described who won the points in order. A game shall be won by the player first scoring 11 points except in the case when both players have 10 points each, then the game shall be won by the first player subsequently gaining a lead of 2 points. Could you please help the Arif find out who the winner was from the given statistics? (It is guaranteed that statistics represent always a valid, finished match.) Constraints: IsTs 1000 I slength(matchscenario) s 100 Input Format: The first line of the input contains an integer 'T', denoting the number of test cases. The description of 'T' test cases follows. Each test case consist a binary string 'S', which describes a match. "O' means Arif lose a point, whereas '1' means he won the point. . Output Format: Print the output on a separate line a string describing who won the match. If Arif won then print "WIN" (without quotes), otherwise print "LOSS" (without quotes). v logical Test Cases Test Case 1 Test Case 2 INPUT (STDIN) INPUT (STDIN) 4 eie1111111111 eeee eee1111111111 111eeeeeee 111e00eeeeeeee 101101e11eie1e 1e01111111111 111001e11011e1 100011e1001e1 1111001110011 EXPECTED OUTPUT 1000100111011 WIN EXPECTED OUTPUT LOSS LOSS LSS LOSS LOSS WIN LOSS LOSS LOSS
Problem Description: Arif likes to play volley ball. He found some statistics of matches which described who won the points in order. A game shall be won by the player first scoring 11 points except in the case when both players have 10 points each, then the game shall be won by the first player subsequently gaining a lead of 2 points. Could you please help the Arif find out who the winner was from the given statistics? (It is guaranteed that statistics represent always a valid, finished match.) Constraints: IsTs 1000 I slength(matchscenario) s 100 Input Format: The first line of the input contains an integer 'T', denoting the number of test cases. The description of 'T' test cases follows. Each test case consist a binary string 'S', which describes a match. "O' means Arif lose a point, whereas '1' means he won the point. . Output Format: Print the output on a separate line a string describing who won the match. If Arif won then print "WIN" (without quotes), otherwise print "LOSS" (without quotes). v logical Test Cases Test Case 1 Test Case 2 INPUT (STDIN) INPUT (STDIN) 4 eie1111111111 eeee eee1111111111 111eeeeeee 111e00eeeeeeee 101101e11eie1e 1e01111111111 111001e11011e1 100011e1001e1 1111001110011 EXPECTED OUTPUT 1000100111011 WIN EXPECTED OUTPUT LOSS LOSS LSS LOSS LOSS WIN LOSS LOSS LOSS
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
![Problem Description:
Arif likes to play volley ball. He found some statistics of matches which described who won the points in order.
A game shall be won by the player first scoring 11 points except in the case when both players have 10 points each, then the game shall be won by the first player subsequently gaining a lead of 2 points.
Could you please help the Arif find out who the winner was from the given statistics? (It is guaranteed that statistics represent always a valid, finished match.)
Constraints:
1sts 1000
I length(matchscenario) s 100
Input Format:
The first line of the input contains an integer 'T', denoting the number of test cases. The description of 'T' test cases follows.
Each test case consist a binary string 'S', which describes a match.
'O' means Arif lose a point, whereas '1' means he won the point.
Output Format:
Print the output on a separate line a string describing who won the match.
IF Arif won then print "WIN" (without quotes), otherwise print "LOSS" (without quotes).
v logical Test Cases
Test Case 1
Test Case 2
INPUT (STDIN)
INPUT (STDIN)
4.
6
e001111111111
111000eeeeeeee
0101111111111
11100000e00eee
1011010110101e
1001111111111
11100101101101
1000110100101
1111001110011
1000100111e11
EXPECTED OUTPUT
EXPECTED OUTPUT
WIN
LOSS
LOSS
LOSS
LOS
LSS
WIN
LOSS
LOS
LOS](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F2385c60d-d494-40d1-addb-7193ef36b181%2Fc10cf3fa-57f2-49e5-9646-36402576ca48%2F01qy4oo_processed.jpeg&w=3840&q=75)
Transcribed Image Text:Problem Description:
Arif likes to play volley ball. He found some statistics of matches which described who won the points in order.
A game shall be won by the player first scoring 11 points except in the case when both players have 10 points each, then the game shall be won by the first player subsequently gaining a lead of 2 points.
Could you please help the Arif find out who the winner was from the given statistics? (It is guaranteed that statistics represent always a valid, finished match.)
Constraints:
1sts 1000
I length(matchscenario) s 100
Input Format:
The first line of the input contains an integer 'T', denoting the number of test cases. The description of 'T' test cases follows.
Each test case consist a binary string 'S', which describes a match.
'O' means Arif lose a point, whereas '1' means he won the point.
Output Format:
Print the output on a separate line a string describing who won the match.
IF Arif won then print "WIN" (without quotes), otherwise print "LOSS" (without quotes).
v logical Test Cases
Test Case 1
Test Case 2
INPUT (STDIN)
INPUT (STDIN)
4.
6
e001111111111
111000eeeeeeee
0101111111111
11100000e00eee
1011010110101e
1001111111111
11100101101101
1000110100101
1111001110011
1000100111e11
EXPECTED OUTPUT
EXPECTED OUTPUT
WIN
LOSS
LOSS
LOSS
LOS
LSS
WIN
LOSS
LOS
LOS
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Recommended textbooks for you
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY