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. un ange frappe a ma porte

    Un signe, une larme 魂牵 泪扰 un mot, une arme 字断 情烧 nettoyer les étoiles à l'alcool de mon ame 灵魂之酒眷洗 星 ...

  2. Navicat_Preminum

    一. 安装 参考http://blog.csdn.net/longyuhome/article/details/79206041. 软件准备• [OYKSOFT.COM]navicat11.0.8_p ...

  3. Java中的随机数生成器:Random,ThreadLocalRandom,SecureRandom(转)

    文中的 Random即:java.util.Random,ThreadLocalRandom 即:java.util.concurrent.ThreadLocalRandomSecureRandom即 ...

  4. Hibernate逆向工程全过程

    前提你已经创建好了数据库,按如下操作进行: 1.添加hibernate.cfg.xml 在src下-->new-->other--->hibernate-->选择“Hibern ...

  5. 域控制器安全策略在哪里 Windows server 2008

    Start(开始)–Programs(程序)–Administrative Tools(管理工具)–Group Policy Management(策略管理器) 展开组策略管理器选择–Forest(林 ...

  6. iostat 离线安装

    由于lucene需要一定的io读写顾安装iostat来对磁盘io进行监控 iostat 属于sysstat下的功能 git路径如下:https://github.com/sysstat/sysstat ...

  7. Binary Search Tree BST Template

    Use one queue + size variable public class Solution { public ArrayList<ArrayList<Integer>&g ...

  8. 利用智能手机(Android)追踪一块磁铁(一)

    之前看到一个外国人用iPhone做了一个追踪磁铁的Demo感觉不错(参考视频:http://v.youku.com/v_show/id_XODM2MjczNzE2.html),然后我就参考做了一个An ...

  9. 【HDU1754】I Hate It(线段树)

    update:单点替换 query:区间最值 #include <iostream> #include <cstring> #include <cstdlib> # ...

  10. OpenStack Mixture HypervisorsDriver configure and implementation theory

    通过本文,您将可以了解在 OpenStack 中如何进行混合 Hypervisor 的配置及其实现原理的基本分析.本文主要结合作者在 Nova 中的实际开发经验对 OpenStack 中混合 Hype ...