CodeForces-2015 HIAST Collegiate Programming Contest-Gym-100952A-Who is the winner?
1 second
64 megabytes
standard input
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?
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).
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.
3
18 03 04 14 03 05
09 45 33 12 03 01
06 36 03 06 36 03
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-2015 HIAST Collegiate Programming Contest-Gym-100952A-Who is the winner?的更多相关文章
- 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 ...
- 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 ...
- 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 ...
- 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 ...
- 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 ...
- 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 ...
- Gym 100952G&&2015 HIAST Collegiate Programming Contest G. The jar of divisors【简单博弈】
G. The jar of divisors time limit per test:2 seconds memory limit per test:64 megabytes input:standa ...
- Gym 100952D&&2015 HIAST Collegiate Programming Contest D. Time to go back【杨辉三角预处理,组合数,dp】
D. Time to go back time limit per test:1 second memory limit per test:256 megabytes input:standard i ...
- Gym 100952C&&2015 HIAST Collegiate Programming Contest C. Palindrome Again !!【字符串,模拟】
C. Palindrome Again !! time limit per test:1 second memory limit per test:64 megabytes input:standar ...
- Gym 100952B&&2015 HIAST Collegiate Programming Contest B. New Job【模拟】
B. New Job time limit per test:1 second memory limit per test:64 megabytes input:standard input outp ...
随机推荐
- LeetCode #1 TwoSum
Description Given an array of integers, return indices of the two numbers such that they add up to a ...
- IOS学习4——block代码块
本文转载自:iOS开发-由浅至深学习block 一.关于block 在iOS 4.0之后,block横空出世,它本身封装了一段代码并将这段代码当做变量,通过block()的方式进行回调.这不免让我们想 ...
- Mybatis-----优化配置文件,基于注解CR
这篇主要写配置文件的优化,例如 jdbc.properties 配置文件 ,引入数据库的文件,例如driver,url,username,password 等,然后在 SqlMapConfig.x ...
- HTML5学习知识点
一.文档问题 1.html5新标签:section.header.footer.nav.aside.blockquote.q.fieldest.figure.address.article.detai ...
- 封装简单的equery
/** * Created by wang on 2016/3/23. */ //绑定操作 function bindEvent(obj,events,fn){ if (obj.addEventLis ...
- linux svn up 中文显示乱码解决办法
vi /etc/sysconfig/i18n #LANG="en_US.UTF-8" #LANG=zh_CN.GB18030 #LC_ALL=zh_CN.GB18030 #SYSF ...
- C# winFrom窗体设计问题-部分文件打不开窗体设计器 变成类.cs
https://zhidao.baidu.com/question/1513483178103163220.html C# winform程序设计的时候,出现了问题.默认主窗体form1(改名form ...
- RAID常用级别的比较
[转]RAID常用级别的比较 特点 硬盘及容量 性能及安全 典型应用 raid 0 用于平行存储,即条带.其原理是把连续的数据分成几份,然后分散存储到阵列中的各个硬盘上.任何一个磁盘故障,都将导致数据 ...
- [Spark性能调优] 第四章 : Spark Shuffle 中 JVM 内存使用及配置内幕详情
本课主题 JVM 內存使用架构剖析 Spark 1.6.x 和 Spark 2.x 的 JVM 剖析 Spark 1.6.x 以前 on Yarn 计算内存使用案例 Spark Unified Mem ...
- Mac操作系统下忘记MYSQL的密码
1. 在系统偏好 中,中止MySQL服务.: 2. cd/usr/local/mysql/bin sudo ./mysqld_safe --skip-grant-tables 3. 登录MySQL ...