302159: CF411C. Kicker

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

Kicker

题意翻译

$Q$ 公司想要举办一场 $Kicker$ 比赛,$Q$ 公司有 $4$ 个球员,标号从 $1$ 到 $4$。队员 $1$ 和 $2$ 在队伍一中,队员 $3$ 和 $4$ 在队伍二中。每个球员都有一个攻击值和防守值,一个队伍中的两人一个进攻,一个防守,队伍的攻击值为攻击队员的攻击值,防守为防守队员的防守值。 在比赛前,双方要确定谁进攻,谁防守,队伍一先决定,队伍二可以根据队伍一的选择来选。 定义:当一队的攻击大于另一队的防守,防守大于另一队的攻击时必胜。 输入:有四行,第 $i$ 行的两个数 $a_i,b_i$ 表示球员 $i$ 的防守值和攻击值。 问:如果队伍一有必胜策略,输出 $Team$ $1$,如果队伍二有必胜策略,输出 $Team$ $2$,否则输出 $Draw$。

题目描述

Kicker (table football) is a board game based on football, in which players control the footballers' figures mounted on rods by using bars to get the ball into the opponent's goal. When playing two on two, one player of each team controls the goalkeeper and the full-backs (plays defence), the other player controls the half-backs and forwards (plays attack). Two teams of company Q decided to battle each other. Let's enumerate players from both teams by integers from $ 1 $ to $ 4 $ . The first and second player play in the first team, the third and the fourth one play in the second team. For each of the four players we know their game skills in defence and attack. The defence skill of the $ i $ -th player is $ a_{i} $ , the attack skill is $ b_{i} $ . Before the game, the teams determine how they will play. First the players of the first team decide who will play in the attack, and who will play in the defence. Then the second team players do the same, based on the choice of their opponents. We will define a team's defence as the defence skill of player of the team who plays defence. Similarly, a team's attack is the attack skill of the player of the team who plays attack. We assume that one team is guaranteed to beat the other one, if its defence is strictly greater than the opponent's attack and its attack is strictly greater than the opponent's defence. The teams of company Q know each other's strengths and therefore arrange their teams optimally. Identify the team that is guaranteed to win (if both teams act optimally) or tell that there is no such team.

输入输出格式

输入格式


The input contain the players' description in four lines. The $ i $ -th line contains two space-separated integers $ a_{i} $ and $ b_{i} $ $ (1<=a_{i},b_{i}<=100) $ — the defence and the attack skill of the $ i $ -th player, correspondingly.

输出格式


If the first team can win, print phrase "Team 1" (without the quotes), if the second team can win, print phrase "Team 2" (without the quotes). If no of the teams can definitely win, print "Draw" (without the quotes).

输入输出样例

输入样例 #1

1 100
100 1
99 99
99 99

输出样例 #1

Team 1

输入样例 #2

1 1
2 2
3 3
2 2

输出样例 #2

Team 2

输入样例 #3

3 3
2 2
1 1
2 2

输出样例 #3

Draw

说明

Let consider the first test sample. The first team can definitely win if it will choose the following arrangement: the first player plays attack, the second player plays defence. Consider the second sample. The order of the choosing roles for players makes sense in this sample. As the members of the first team choose first, the members of the second team can beat them (because they know the exact defence value and attack value of the first team).

Input

题意翻译

$Q$ 公司想要举办一场 $Kicker$ 比赛,$Q$ 公司有 $4$ 个球员,标号从 $1$ 到 $4$。队员 $1$ 和 $2$ 在队伍一中,队员 $3$ 和 $4$ 在队伍二中。每个球员都有一个攻击值和防守值,一个队伍中的两人一个进攻,一个防守,队伍的攻击值为攻击队员的攻击值,防守为防守队员的防守值。 在比赛前,双方要确定谁进攻,谁防守,队伍一先决定,队伍二可以根据队伍一的选择来选。 定义:当一队的攻击大于另一队的防守,防守大于另一队的攻击时必胜。 输入:有四行,第 $i$ 行的两个数 $a_i,b_i$ 表示球员 $i$ 的防守值和攻击值。 问:如果队伍一有必胜策略,输出 $Team$ $1$,如果队伍二有必胜策略,输出 $Team$ $2$,否则输出 $Draw$。

加入题单

上一题 下一题 算法标签: