time limit per test

1 second

memory limit per test

64 megabytes

input

standard input

output

standard output

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.

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

题意就是比较谁花的时间少,水题

代码:

#include<bits/stdc++.h>
using namespace std;
int main(){
int n;
int a,b,c,a1,b1,c1;
while(~scanf("%d",&n)){
while(n--){
scanf("%d%d%d%d%d%d",&a,&b,&c,&a1,&b1,&c1);
if(a>a1) {printf("Player2\n");}
else if(a<a1) {printf("Player1\n");}
else if(a==a1){
if(b>b1){printf("Player2\n");}
else if(b<b1){printf("Player1\n");}
else if(b==b1){
if(c>c1){printf("Player2\n");}
else if(c<c1){printf("Player1\n");}
else printf("Tie\n");
}
}
}
}
return ;
}

Codeforces Gym100952 A.Who is the winner? (2015 HIAST Collegiate Programming Contest)的更多相关文章

  1. Gym 100952E&&2015 HIAST Collegiate Programming Contest E. Arrange Teams【DFS+剪枝】

    E. Arrange Teams time limit per test:2 seconds memory limit per test:64 megabytes input:standard inp ...

  2. Gym 100952F&&2015 HIAST Collegiate Programming Contest F. Contestants Ranking【BFS+STL乱搞(map+vector)+优先队列】

    F. Contestants Ranking time limit per test:1 second memory limit per test:24 megabytes input:standar ...

  3. Codeforces Gym100952 B. New Job (2015 HIAST Collegiate Programming Contest)

      B. New Job   time limit per test 1 second memory limit per test 64 megabytes input standard input ...

  4. Codeforces Gym100952 D. Time to go back-杨辉三角处理组合数 (2015 HIAST Collegiate Programming Contest)

    D. Time to go back   time limit per test 1 second memory limit per test 256 megabytes input standard ...

  5. Codeforces Gym100952 C. Palindrome Again !!-回文字符串 (2015 HIAST Collegiate Programming Contest)

      C. Palindrome Again !!   time limit per test 1 second memory limit per test 64 megabytes input sta ...

  6. Gym 100952A&&2015 HIAST Collegiate Programming Contest A. Who is the winner?【字符串,暴力】

    A. Who is the winner? time limit per test:1 second memory limit per test:64 megabytes input:standard ...

  7. Gym 100952J&&2015 HIAST Collegiate Programming Contest J. Polygons Intersection【计算几何求解两个凸多边形的相交面积板子题】

    J. Polygons Intersection time limit per test:2 seconds memory limit per test:64 megabytes input:stan ...

  8. Gym 100952I&&2015 HIAST Collegiate Programming Contest I. Mancala【模拟】

    I. Mancala time limit per test:3 seconds memory limit per test:256 megabytes input:standard input ou ...

  9. Gym 100952H&&2015 HIAST Collegiate Programming Contest H. Special Palindrome【dp预处理+矩阵快速幂/打表解法】

    H. Special Palindrome time limit per test:1 second memory limit per test:64 megabytes input:standard ...

随机推荐

  1. OSCache页面缓存的使用

    完成项目时,为了减少对数据库的频繁操作,引出了缓存,缓存分为以下几种: 1.一级缓存 一级缓存的存储域是session,作用于单个的dao 2.二级缓存 二级缓存的存储域是sessionFactory ...

  2. 【bzoj1977】[BeiJing2010组队]次小生成树 Tree 最小生成树+权值线段树合并

    题目描述 求一张图的严格次小生成树的边权和,保证存在. 输入 第一行包含两个整数N 和M,表示无向图的点数与边数. 接下来 M行,每行 3个数x y z 表示,点 x 和点y之间有一条边,边的权值为z ...

  3. [洛谷P2657][SCOI2009]windy数

    题目大意:不含前导零且相邻两个数字之差至少为$2$的正整数被称为$windy$数.问$[A, B]$内有多少个$windy$数? 题解:$f_{i, j}$表示数有$i$位,最高位为$j$(可能为$0 ...

  4. MFC Button控件自绘

    文章参考地址:  http://blog.csdn.net/yue7603835/article/details/6649458    VC下的界面着实难看 有时候我们不得不自己进行控件的绘制 以前 ...

  5. maven工程开启jetty调试

    转摘自:http://czj4451.iteye.com/blog/1942437 准备工作: a. 在pom.xml中配置jetty插件: <plugins> <plugin> ...

  6. Spring学习--切面优先级及重用切点表达式

    指定切面的优先级: 在同一个链接点上应用不止一个切面时 , 除非明确指定 , 否则它们的优先级是不确定的. 切面的优先级可以通过实现 Ordered 接口或利用 @Order 注解指定. 实现 Ord ...

  7. javascript简易下拉菜单效果

    JS代码: window.onload=function(){ var oDiv=document.getElementById('navMenu'); var aUl=oDiv.getElement ...

  8. 知问前端——自动补全UI

    自动补全(autocomplete),是一个可以减少用户输入完整信息的UI工具.一般在输入邮箱.搜索关键字等,然后提取出相应完整字符串供用户选择. 调用autocomplete()方法 var hos ...

  9. 【Atcoder】ARC 080 E - Young Maids

    [算法]数学+堆 [题意]给定n个数的排列,每次操作可以取两个数按序排在新序列的头部,求最小字典序. [题解] 转化为每次找字典序最小的两个数按序排在尾部,则p1和p2的每次选择都必须满足:p1在当前 ...

  10. .NET中zip的压缩和解压

    在.NET可以通过多种方式实现zip的压缩和解压:1.使用System.IO.Packaging:2.使用第三方类库:3.通过 System.IO.Compression 命名空间中新增的ZipArc ...