Tenis2
After Borko's second plan of taking over the village fell through (because Mirko's brother Stanko drank all the water), young Zvonko decided to relax with sports. For this purpose he stocked up on carrot juice and peanuts, and dived onto the couch, ready to watch the next tennis match on television. While the two players are warming up, their statistics pop up on the screen. Zvonko noticed that the match history of the players contained invalid results. He had a brilliant idea where you write him a program that checks the validity of results, which he will then sell to the record keepers and enjoy a leisurely life. A tennis match consists of sets, each set consisting of games. The following rules apply:
• A player wins a set if he has 6 or more games and at least two games more than his opponent.
• Additionally, if the result is 6:6 in the first or second set (but not the third set), a single final game is played to determine the winner of the set (the tieBbreak game).
• The match ends when either player has won 2 sets. That player is the winner. A match result is valid if a match could have been played by the above rules and ended in the result. Additionally, if one of the players is Roger Federer (designated as "federer" in the input), then a result in which he has lost a set can't be valid (Zvonko knows Federer is from outer space). Write a program that checks the validity of all matches between two players.
sampras agassi
6
6:2 6:4
3:6 7:5 2:6
6:5 7:4
7:6 7:6
6:2 3:6
6:2 1:6 6:8 Output
da
da
ne
da
ne
da Submit solution
Coming laterThe grading service will be connected in a later migration step. You can inspect the task and your previous results now.