One of the most popular golf events is the Skins Game, where four golfers compete head-to-head for "skins" (and each skin is worth a certain amount of money). Each hole on the 18-hole course is worth a skin. If one of the four golfers shoots a score on a hole that is lower than the other three golfers, then that player wins the skin for that hole. If there is a tie for the low score on that hole, then nobody wins the skin and it carries over to the next hole. That is, the winner of the next hole (whoever that may be) wins 2 skins. Of course, there might be a tie on the next hole as well, in which case the skins keep adding up until someone wins a hole.
You are to write a program that repeatedly reads in the scores for four players and displays the number of skins won by each player. Note that it is possible for the 18 holes to conclude with unclaimed skins. In the real event, play continues until someone wins the skins. Your program, however, should simply display the number of unclaimed skins (if any) after 18 holes.
Input (from file input3.txt):The first line of input contains a positive integer specifying the number of data sets to be read and processed. Each data set consists of four lines, each containing 18 integers. The integers on the first line of the data set are the scores for player 1 (first score is hole 1, second score is hole 2, etc.), the integers on the second line are the scores for player 2, etc.
Output (to file output3.txt): For each data set, you should output the data set number as well as the number of skins won by each player. If there are any skins remaining after 18 holes, your program should display this number. The output format should be as below (note the correct plurality of SKIN/SKINS).
|Example input:||Example output:|