CodeForces-2015 HIAST Collegiate Programming Contest-Gym-100952A-Who is the winner?

Posted Persistent.

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了CodeForces-2015 HIAST Collegiate Programming Contest-Gym-100952A-Who is the winner?相关的知识,希望对你有一定的参考价值。

A. Who is the winner?
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 0;
}

。。。




以上是关于CodeForces-2015 HIAST Collegiate Programming Contest-Gym-100952A-Who is the winner?的主要内容,如果未能解决你的问题,请参考以下文章

Bootstrap 3、col 和 col-# 类

这些类的顺序; col-sm , col-lg , col-md 和 col-xs 不同

如何在 Col3 中显示 Col1 值为 true 的值,而 Col1 中的 false 值仅在 Col3 中显示 NULL

bootstrap -- 一个标签中,同时有 col-xs , col-sm , col-md , col-lg

如何在 C# 中按小时格式(120:15:10)的行求和/分组,如 SQL - SELECT SUM (col1), col 2, col3 GROUP BY col2, col3

col-lg-4 和 col-md-3 和 col-xs-3 有啥区别?