CF411C.Kicker

普及+/提高

通过率:0%

时间限制:1.00s

内存限制:256MB

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

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.

桌上足球(Table Football)是一种基于足球的棋盘游戏,玩家通过操纵固定在杆上的球员模型(利用横杆控制)将球射入对方球门。当进行 2 对 2 比赛时,每支队伍中的一名球员负责操控守门员和后卫(即承担防守任务),另一名球员负责操控中场和前锋(即承担进攻任务)。

公司 Q 的两支队伍决定相互较量。我们将双方队伍的四名球员分别用整数 11 至 44 编号:第 11 和第 22 号球员属于第一支队伍,第 33 和第 44 号球员属于第二支队伍。对于每名球员 ii,我们已知其防守技能值 aia_i 和进攻技能值 bib_i。

比赛开始前,双方队伍需确定各自的战术分工。首先,第一支队伍的两名球员决定谁负责进攻、谁负责防守;随后,第二支队伍的两名球员根据第一支队伍的选择,再决定各自的分工。

我们定义一支队伍的防守能力为其负责防守的那名球员的防守技能值;类似地,定义其进攻能力为其负责进攻的那名球员的进攻技能值。我们称一支队伍必定击败另一支队伍,当且仅当:

  • 该队的防守能力 严格大于 对方的进攻能力,且
  • 该队的进攻能力 严格大于 对方的防守能力。

公司 Q 的两支队伍彼此熟知各自队员的能力,因此均会以最优策略安排分工。请判断:在双方均采取最优策略的前提下,哪支队伍必定获胜;若不存在必定获胜的队伍,请说明“不存在这样的队伍”。

输入格式

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.

输入包含四行,每行描述一名球员。第 ii 行包含两个用空格分隔的整数 aia_i 和 bib_i(1≤ai,bi≤1001 \leq a_i, b_i \leq 100),分别表示第 ii 名球员的防守能力和进攻能力。

输出格式

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).

如果第一支队伍能够获胜,则输出短语 “Team 1”(不带引号);如果第二支队伍能够获胜,则输出短语 “Team 2”(不带引号)。如果两支队伍均无法确保获胜,则输出 “Draw”(不带引号)。

输入输出样例

  • 输入#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).

考虑第一个测试样例。若第一支队伍选择如下安排:第一名队员担任进攻角色,第二名队员担任防守角色,则其必然获胜。

考虑第二个测试样例。在此样例中,队员选择角色的顺序是关键的。由于第一支队伍的队员先选择角色,第二支队伍的队员便可据此击败他们(因为他们确切知晓第一支队伍的防守值与攻击值)。

输入解题思路,AI测评打分。不知道怎么写?

首页