Octorber 21st

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 3534    Accepted Submission(s):
2174

Problem Description
HDU's 50th birthday, on Octorber 21st, is coming. What
an exciting day!! As a student of HDU, I always want to know how many days are
there between today and Octorber 21st.So, write a problem and tell me the
answer.Of course, the date I give you is always in 2006.

 
Input
The input consists of T test cases. The number of T is
given on the first line of the input file.Following T lines, which represent
dates, one date per line. The format for a date is "month day" where month is a
number between 1 (which indicates January) and 12 (which indicates December),
day is a number between 1 and 31.All the date in the input are in 2006, you can
assume that all the dates in the input are legal(合法).
 
Output
For each case, if the date is before Octorber 21st, you
should print a number that between the date and Octorber 21st.If the day is
beyond Octorber 21st, just print "What a pity, it has passed!".If the date is
just Octorber 21st, print"It's today!!".
 
Sample Input
7
 
10 20
10 19
10 1
10 21
9 1
11 11
12 12
 
Sample Output
1
2
20
It's today!!
50
What a pity, it has passed!
What a pity, it has passed!
 #include <cstdio>
#include <iostream>
using namespace std;
int a[]={,,,,,,,,,,,,};
int main()
{
int T,i,j;
cin>>T;
while(T--)
{
int x,y,time=;
cin>>x>>y;
if(x>||(x==&&y>))
cout<<"What a pity, it has passed!"<<endl;
else if(x==&&y==)
cout<<"It's today!!"<<endl;
else if(x==)
cout<<-y<<endl;
else
{
for(i=x+;i<;i++)
time+=a[i];
time+=(a[x]-y);
cout<<time+<<endl;
}
}
}

Octorber 21st的更多相关文章

  1. hdu 1491 Octorber 21st

    Octorber 21st Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Tot ...

  2. HDOJ(HDU) 1491 Octorber 21st

    Problem Description HDU's 50th birthday, on Octorber 21st, is coming. What an exciting day!! As a st ...

  3. hdu----149850 years, 50 colors(最小覆盖点)

    50 years, 50 colors Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Othe ...

  4. HDU 1498 50 years, 50 colors(最小点覆盖,坑称号)

    50 years, 50 colors Problem Description On Octorber 21st, HDU 50-year-celebration, 50-color balloons ...

  5. hdu149850 years, 50 colors (多个最小顶点覆盖)

    50 years, 50 colors Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) ...

  6. 50 years, 50 colors

    50 years, 50 colors Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) ...

  7. hdu 1498 50 years, 50 colors 最小点覆盖

    50 years, 50 colors Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Othe ...

  8. hdu 1498 50 years, 50 colors(二分匹配_匈牙利算法)

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1498 50 years, 50 colors Time Limit: 2000/1000 MS (Ja ...

  9. 50 years, 50 colors HDU - 1498(最小点覆盖或者说最小顶点匹配)

    On Octorber 21st, HDU 50-year-celebration, 50-color balloons floating around the campus, it's so nic ...

随机推荐

  1. Android AsyncTask 异步任务操作

    1:activity_main.xml <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/androi ...

  2. 《Programming WPF》翻译 第5章 2.内嵌样式

    原文:<Programming WPF>翻译 第5章 2.内嵌样式 每一个“可样式化”的WPF元素都有一个Style属性,可以在内部设置这个属性--使用XAML属性-元素的语法(在第一章讨 ...

  3. PowerShell_零基础自学课程_6_PS中获取帮助信息详解、管道、格式化输

    前些文章陆续的说了一些关于这些主题,但是讨论的都不够深入,今天我们深入的了解一下获取帮助信息.管道以及格式化输出的内容. 一.获取帮助信息 在PS中获取帮助信息,最常用的有: -? .get-comm ...

  4. mysql 增量导入到elasticsearch

    <pre name="code" class="html">zjtest7-redis:/odbc_es# cat /odbc_es/run_mys ...

  5. 【转】Linux下tar.xz结尾的文件的解压方法--不错

    原文网址:http://blog.csdn.net/silvervi/article/details/6325698 今天尝试编译内核,下载到了一份tar.xz结尾的压缩文件,网上解决方法比较少,不过 ...

  6. vijos1777 引水入城

    描述 在一个遥远的国度,一侧是风景秀美的湖泊,另一侧则是漫无边际的沙漠.该国的行政区划十分特殊,刚好构成一个N行M列的矩形,其中每个格子都代表一座城市,每座城市都有一个海拔高度. 为了使居民们都尽可能 ...

  7. Only2 Labs — A Visual Design Studio

    Only2 Labs - A Visual Design Studio 设计合作 对您目前的设计很不满意?或是急缺一个设计供应商?您的团队最近做的项目需要指导?Only2都很乐意为您解困惑. 或者,你 ...

  8. javascript的事件处理

        首先了解一下什么是事件?事件是web浏览器通知应用程序发生了什么事情.我们可以通过一些方式注册事件用来监听一些我们需要处理的事件.事件包含一下一些属性:     事件类型:用来说明是什么类型事 ...

  9. js网页返回页面顶部的小方法

    咳咳,在网页出现滚动条的时候,许多网站会在右下角出现一个图标,点击可以回到页面顶部 本文就记录下js实现代码: 1.在html页面body添加dom元素 <img src="toTop ...

  10. Java里多个Map的性能比較(TreeMap、HashMap、ConcurrentSkipListMap)

    问题 比較Java原生的 1.  TreeMap 2.  HashMap 3.  ConcurrentSkipListMap 3种Map的效率. 结果 模拟150W以内海量数据的插入和查找,通过添加和 ...