<reponame>mauromascarenhas/PGC_UFABC
{"output":"For each test case output control of the game in normal time , based on the goals that have been marked .","input":"There will be several test cases . The first number being read C is an integer representing the number of test cases. Each test case begins with an integer P , representing the amount of goals in the match . The following will be read P lines , each with two characters M and S , indicating the first letter of the team that scored the goal and the first letter of the team that conceded the goal , respectively.","level":3,"name":"Tribol","has_images":true,"description":"In the city of Triangulândia, the biggest dream of its population was to build a soccer field, but there all land is triangular. If one were to make a rectangular field, a good part of the land would be seized to build the field. Then the Hypo and Tenusa brothers had a great idea: Creating a new game, derived from soccer, but played in a triangular field, and called the Tribol game. The rules were simple: They play three teams at the same time: Red, Green and Blue.\r\n\r\n\u2022 The match a time of thirty minutes.\r\n\r\n\u2022 The team that scores a goal in the opponent's the same counterclockwise, is a normal goal.\r\n\r\n\u2022 The team that scores a goal in the clockwise opponent the same, worth double.\r\n\r\n\u2022 If the three teams make the same amount of goals, there is a trempate\r\n\r\n\u2022 If the two teams who make more goals have made the same amount, there is a tie, and the game is decided by penalties.\r\n\r\n\u2022 The team that makes the most goals, wins. Example of departure. The teams are arranged in the same field in the image below.\r\n\r\n\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\r\n\r\n\u2022 The Green team makes a goal in the Blue team and a goal in the Red team, totaling three goals ;\r\n\r\n\u2022 The Blue team is two goals in the Green team, totaling 2 goals ;\r\n\r\n\u2022 The team makes two goals in Red Green team, totaling four goals and winning the match .","id":"1875","category":"Computational Geometry","statistics":{"level":"3 / 10","submissions":2979,"solved":1348,"ratio":"45.25%"}}