A - A简单简单



Time limit : 1 sMemory limit : 64 mb
Submitted : 29Accepted : 25
64bit Integer Format : %lld

Problem Description

A big marathon is held on Al-Maza Road, Damascus. Runners came from all over the world to run all the way along the road in this big marathon day. The winner is the player who crosses the finish line first.

The organizers write down finish line crossing time for each player. After the end of the marathon, they had a doubt between 2 possible winners named "Player1" and "Player2". They will give you the crossing time for those players and they want you to say who is the winner?

Input

First line contains number of test cases (1  ≤  T  ≤  100). Each of the next T lines represents one test case with 6 integers H1 M1 S1 H2 M2 S2. Where H1, M1, S1 represent Player1 crossing time (hours, minutes, seconds) and H2, M2, S2 represent Player2 crossing time (hours, minutes, seconds). You can assume that Player1 and Player2 crossing times are on the same day and they are represented in 24 hours format(0  ≤  H1,H2  ≤  23 and 0  ≤  M1,M2,S1,S2  ≤  59)

H1, M1, S1, H2, M2 and S2 will be represented by exactly 2 digits (leading zeros if necessary).

Output

For each test case, you should print one line containing "Player1" if Player1 is the winner, "Player2" if Player2 is the winner or "Tie" if there is a tie.

Sample Input

Input
3
18 03 04 14 03 05
09 45 33 12 03 01
06 36 03 06 36 03
Output
Player2
Player1
Tie

Sample Output




#include<stdio.h>
int main()
{
 int m;
 scanf("%d",&m);
 int h1,h2,m1,m2,s1,s2;
 for(int i=0;i<m;i++)
 {
  scanf("%d%d%d%d%d%d",&h1,&m1,&s1,&h2,&m2,&s2);
  if(h1>h2)
   printf("Player2\n");
  else if(h1==h2)
  {
   if(m1>m2)
    printf("Player2\n");
   else if(m1==m2)
   {
    if(s1>s2)
     printf("Player2\n");
    else if(s1==s2)
     printf("Tie\n");
    else
     printf("Player1\n");
   }
   else
    printf("Player1\n");
  }
  else
   printf("Player1\n");
 }
 return 0;
}
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值