哈哈哈哈哈哈哈,最近一直在补题,改各种错误的代码,wa了20多遍,改到心态爆炸,改好之后,感觉世界都美好了(叉会腰~)。。。

 
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-2015 HIAST Collegiate Programming Contest-Gym-100952A.水题 100952B.水题 100952C.回文字符串 100952D.杨辉三角处理组合数 其他题目待续。。。的更多相关文章

  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. 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 ...

  4. 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 ...

  5. 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 ...

  6. 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 ...

  7. 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 ...

  8. 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 ...

  9. 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 ...

随机推荐

  1. Spring+MVC+Mybatis整合

    本文是对慕课网上"搞定SSM开发"路径的系列课程的总结,详细的项目文档和课程总结放在github上了.点击查看 什么是秒杀业务 网站售卖某产品时,规定在某个日期开始售卖限量的产品, ...

  2. DeepLearning.ai学习笔记汇总

    第一章 神经网络与深度学习(Neural Network & Deeplearning) DeepLearning.ai学习笔记(一)神经网络和深度学习--Week3浅层神经网络 DeepLe ...

  3. nginx搭建rtmp协议流媒体服务器总结

    最近在 ubuntu12.04+wdlinux(centos)上搭建了一个rtmp服务器,感觉还挺麻烦的,所以记录下. 大部分都是参考网络上的资料. 前提: 在linux下某个目录中新建一个nginx ...

  4. 豹哥嵌入式讲堂:ARM开发中有用的文件(1)- source文件

    大家好,我是豹哥,猎豹的豹,犀利哥的哥.今天豹哥给大家讲的是嵌入式开发里的source文件种类. 众所周知,嵌入式开发属于偏底层的开发,主要编程语言是C和汇编.所以本文要讲的source文件主要指的就 ...

  5. CPP--正码,反码,补码~附整数溢出的探讨

    之前说到了long的争议(http://www.cnblogs.com/dotnetcrazy/p/8059210.html),这边就不用long来举例了,用int吧 可以看一下这篇文章(http:/ ...

  6. 随便说说 post-processing

    九月份一篇博都没更新,这段时间一直在unity的坑里爬不起来,感觉真的很绝望啊,仿佛对生活都失去了信心. 渲染问题并没有解决,目前方案只是减轻视觉冲突,降低违和感.项目AR产品也做的越来越艰难,开始经 ...

  7. [编织消息框架][JAVA核心技术]动态代理应用1

    前面几篇介绍,终于到了应用阶段啦,我们来做一个RPC来加强学过的知识 做基础核心时先确定解决什么问题,提供什么服务,同将来扩展等 rpc 分两部份,一个是调用者,另一方是服务提供者 调用者只关心那个服 ...

  8. pycharm2017.3专业版激活注册码

    pycharm作为一个不错的python编程的ide很有用处 这里拔出一段专业版的注册码,社区版用起来确实着实让人着急. 2017-12-1921:40:38 EB101IWSWD-eyJsaWNlb ...

  9. ES6(四)字符串的扩展

    1.字符的表示方式 最早在  \u0000-\uFFFF 之间的字符已经足够使用吗,每个字符占两个字节,超出范围,必须使用双字节形式表达, 即每个字符占四个字节.超出范围的字符,会被解读成  \uXX ...

  10. win10使用u盘装回win7

    背景:一朋友要我帮忙把系统从win10装回到win7,因为做IT的嘛,想想也难不倒我,况且以前也经常重装系统,硬盘里就有win7的系统,于是很爽快的答应了.电脑拿过来一试才知道原来有这么多坑,原来的系 ...