Gym 100952 A. 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 <iostream>
- #include <cstdio>
- #include <cstring>
- #include <queue>
- #include <cmath>
- #include <vector>
- #include <set>
- #include <map>
- #include <algorithm>
- using namespace std;
- typedef long long ll;
- int main()
- {
- int a,b,c,x,y,z,n;
- cin>>n;
- while(n--)
- {
- cin>>a>>b>>c>>x>>y>>z;
- int ans=a**+b*+c;
- int pos=x**+y*+z;
- if(ans>pos) puts("Player2");
- else if(ans<pos) puts("Player1");
- else puts("Tie");
- }
- }
Gym 100952 A. Who is the winner?的更多相关文章
- Gym 100952 D. Time to go back(杨辉三角形)
D - Time to go back Gym - 100952D http://codeforces.com/gym/100952/problem/D D. Time to go back time ...
- codeforces gym 100952 A B C D E F G H I J
gym 100952 A #include <iostream> #include<cstdio> #include<cmath> #include<cstr ...
- Gym 100952 H. Special Palindrome
http://codeforces.com/gym/100952/problem/H H. Special Palindrome time limit per test 1 second memory ...
- Gym 100952 G. The jar of divisors
http://codeforces.com/gym/100952/problem/G G. The jar of divisors time limit per test 2 seconds memo ...
- Gym 100952 F. Contestants Ranking
http://codeforces.com/gym/100952/problem/F F. Contestants Ranking time limit per test 1 second memor ...
- Gym 100952 D. Time to go back
http://codeforces.com/gym/100952/problem/D D. Time to go back time limit per test 1 second memory li ...
- Gym 100952 C. Palindrome Again !!
http://codeforces.com/gym/100952/problem/C C. Palindrome Again !! time limit per test 1 second memor ...
- 【Gym 100712A】Who Is The Winner?
题 题意 解题数目越多越排前,解题数目相同罚时越少越排前,求排第一的队伍名字. 分析 用结构体排序. 代码 #include<cstdio> #include<algorithm&g ...
- Gym 100952 B. New Job
B. New Job time limit per test 1 second memory limit per test 64 megabytes input standard input outp ...
随机推荐
- PostgreSQL Replication之第九章 与pgpool一起工作(5)
9.5 检查复制 如果所有的节点都处于开机并运行的状态.我们就可以在集群上运行我们的第一个操作了.在我们的例子中,我们将简单地连接到pgpool并创建一个新的数据库.createdb 是一个命令行工具 ...
- Linux-CentOS5/6启动流程
Linux-CentOS5/6启动流程
- NodeJS学习笔记 进阶 (12)Nodejs进阶:crypto模块之理论篇
个人总结:读完这篇文章需要30分钟,这篇文章讲解了使用Node处理加密算法的基础. 摘选自网络 Nodejs进阶:crypto模块之理论篇 一. 文章概述 互联网时代,网络上的数据量每天都在以惊人的速 ...
- 通过.ENV文件来配置ThinkPHP的数据库连接信息
在ThinkPHP系统根目录创建.env文件,注意WINDOWS无法直接右键创建,使用编辑器保存时设置文件名为.env就可以创建文件.内容如下: .evn文件内容如下: [database] host ...
- Laravel API 允许跨域访问
服务器A请求服务器B的接口,那么一般会出现跨域问题.全解跨域请求处理办法 XMLHttpRequest cannot load http://api.console.vms3.com/api/user ...
- CsGL着色的三角形
转自NeHe教程 public override void Draw() { // Here's Where We Do All The Drawing glClear(GL_COLOR_BUFFER ...
- hdu5336XYZ and Drops
题意:给出r*c的网格,有的网格为空.有的有水.再给出一个爆炸点,从这个点向四周爆出四个水滴,若碰到水则融为一体,若碰到其它水滴直接跑过去互不影响.每秒可跑一格,若水中水滴数量超过4则爆开.问T秒后网 ...
- 【Android进阶】Junit单元測试环境搭建以及简单有用
单元測试的目的 首先.Junit单元測试要实现的功能,就是用来測试写好的方法是否可以正确的运行,一般多用于对业务方法的測试. 单元測试的环境配置 1.在AndroidManifest清单文件的Appl ...
- 网易2016研发project师笔试题
网易2016研发project师笔试题 2015/12/9 11:25(网上收集整理的,參考答案在后面,若有错误请大神指出) 1. 运行指令find / -name "test.c" ...
- p2p項目夭折,有種蛋蛋的憂傷。。
在高考完的暑假就在跟杰哥讨论怎样实现的校内p2p文件共享,就在今天.我们无奈的宣布差点儿夭折. 上图是測试图. 那时候的思路已经完好.就是:"学生上传共享文件到咱们工作室的server. ...