A - Time

Description

standard input/output
Statements

A plane can go from city X to city Y in 1 hour and 20 minutes. However, when it returns from city Y to city X, with the same speed, it spends only 80 minutes! If you don’t know how might that happen, just remember that 1 hour and 20 minutes is the same as 80 minutes ;-) In this problem you will have 2 durations of time and you have to decide if they are equal or not.

Input

The first line will be the number of test cases T. Each test case has two lines, the first line represents the first duration and contains 3 integers: h, m, s; these are the Hours, Minutes and Seconds. The second line represent the second duration with 3 integers also, in the same way. All integers are positive and below 5000.

Output

For each test case, print one line which contains the number of the test case. Then print “Yes” if the 2 durations are equal and print “No” otherwise, see the samples and follow the output format.

Sample Input

 
 
 

Input
3
1 20 0
0 80 0
0 2 10
0 0 130
2 10 5
2 11 0
Output
Case 1: Yes
Case 2: Yes
Case 3: No
/*
给出时分秒,看两个时间是否相同
*/
#include<stdio.h>
#include<iostream>
#include<algorithm>
#include<string.h>
#include<vector>
#define N 200010
using namespace std;
int main()
{
//freopen("in.txt","r",stdin);
int t,n;
scanf("%d",&t);
for(int l=;l<=t;l++)
{
long long s1=,s2=;
for(int i=;i<;i++)
{
scanf("%d",&n);
s1+=n;
s1*=;
}
for(int i=;i<;i++)
{
scanf("%d",&n);
s2+=n;
s2*=;
}
if(s1==s2)
printf("Case %d: Yes\n",l);
else
printf("Case %d: No\n",l);
}
return ;
}

暑假练习赛 007 A - Time的更多相关文章

  1. 暑假练习赛 007 E - Pairs

    E - Pairs Description standard input/outputStatements In the secret book of ACM, it’s said: “Glory f ...

  2. 暑假练习赛 007 C - OCR

    C - OCR Description standard input/outputStatements Optical Character Recognition (OCR) is one of th ...

  3. 暑假练习赛 007 B - Weird Cryptography

    Weird Cryptography Description standard input/outputStatements Khaled was sitting in the garden unde ...

  4. 暑假练习赛 003 F Mishka and trip

    F - Mishka and trip Sample Output   Hint In the first sample test: In Peter's first test, there's on ...

  5. 暑假练习赛 003 B Chris and Road

    B - Chris and Road Crawling in process... Crawling failed Time Limit:2000MS     Memory Limit:262144K ...

  6. 暑假练习赛 003 A Spider Man

    A - Spider Man Crawling in process... Crawling failed Time Limit:2000MS     Memory Limit:262144KB    ...

  7. 暑假练习赛 006 B Bear and Prime 100

    Bear and Prime 100Crawling in process... Crawling failed Time Limit:1000MS     Memory Limit:262144KB ...

  8. 暑假练习赛 006 E Vanya and Label(数学)

    Vanya and LabelCrawling in process... Crawling failed Time Limit:1000MS     Memory Limit:262144KB    ...

  9. 暑假练习赛 006 A Vanya and Food Processor(模拟)

    Description Vanya smashes potato in a vertical food processor. At each moment of time the height of ...

随机推荐

  1. CKEditor与dotnetcore实现图片上传

    CKEditor的使用 1.引入js库 <script src="https://cdn.ckeditor.com/4.6.1/standard-all/ckeditor.js&quo ...

  2. 乐橙谷浅析JAVA程序员就业前景

    不知道大家对Java就业前景了解多少.随着信息化的发展,IT培训受倒了越来越多人的追捧.在开发领域,JAVA培训成为了许多人的首选!JAVA应用广泛,JAVA培训就业前景良好!目前,虽然JAVA人才的 ...

  3. XtraGrid滚轮翻页

    滚轮翻页与传动的翻页更为方便,经过本人一番探讨与琢磨终于在XtraGrid的GridView中实现了鼠标滚轮翻页. 我新建了一个组件继承原本的GridControl,在组件中添加了一个ImageLis ...

  4. 详解 HTTPS 移动端对称加密套件优

    近几年,Google.Baidu.Facebook 等互联网巨头大力推行 HTTPS,国内外的大型互联网公司很多也都已启用全站 HTTPS. Google 也推出了针对移动端优化的新型加密套件 Cha ...

  5. php数组合并,反转,去重,添加元素等;

    //参数默认值//function abc($a,$b,$c = 0){// echo $a,$b,$c;//}//abc(1,3);//结果等于130://echo "<br> ...

  6. WebSocket 开发模拟客户端与有游戏服务器通信

    WebSocket 客户端测试功能 websocket是有标准的通信协议,在h2engine服务器引擎中继承了websocket通信协议,使用websocket通信协议的好处是很多语言或框架都内置了w ...

  7. maven详解之结构

    maven 父子关系 父项目中打包方式必须是pom  如 <packaging>pom</packaging>,父项目中使用<modules><module& ...

  8. 好用的前端页面性能检测工具—sitespeed.io

    引言 最近在做HTTP2技术相关调研,想确认一下HTTP2在什么情境下性能会比HTTP1.x有显著提升,当我把http2的本地环境(nginx+PHP)部署完成后进行相关测试时,我遇到了以下问题: ( ...

  9. kmp next数组的理解(挺好的一篇文章 ,原来kmp最初的next是这样的啊,很好理解)

    KMP算法的next[]数组通俗解释   我们在一个母字符串中查找一个子字符串有很多方法.KMP是一种最常见的改进算法,它可以在匹配过程中失配的情况下,有效地多往后面跳几个字符,加快匹配速度. 当然我 ...

  10. Conscription poj3723(最大生成树)

    Conscription Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 6870   Accepted: 2361 Desc ...