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. (摘) MDI登陆问题

    MDI编程中需要验证用户身份,那么登陆窗口就需要在验证密码后进行相关的隐藏处理. (1)隐藏登陆窗口(登陆窗体作为启动) 登陆按钮事件:this.Hide();//隐藏登陆窗口MDI_Name M = ...

  2. Spring Boot 启动加载数据 CommandLineRunner

    实际应用中,我们会有在项目服务启动的时候就去加载一些数据或做一些事情这样的需求. 为了解决这样的问题,Spring Boot 为我们提供了一个方法,通过实现接口 CommandLineRunner 来 ...

  3. 四种简单的排序算法的php实现

    无聊,用php写几个排序算法,算法介绍请移步这里,这里使用php实现了几个简单的,如下 //选择排序 function selection_sort($arr){ $len = count($arr) ...

  4. 《UNIX环境高级编程》笔记--chown,fchown和lchown函数

    这三个函数都是用来更改文件的用户ID和组ID的,函数的定义如下: #include <unistd.h> int chown(const char *pathname, uid_t own ...

  5. Linux网络编程--多播

    一.多播介绍 什么是多播? 单播用于两个主机之间的端对端通信,广播用于一个主机对整个局域网上所有主机上的数据通信.单播和广播是两个极端,要么对一个主机进行通信,要么对整个局域网上的主机进行通信.实际情 ...

  6. 把分类的select写在moden里做成一个组件 高洛峰

    function selectform($name="pid", $pid=0) { $data = $this->field('id, concat(path, " ...

  7. 自定义一个searchBar

    #import "CZSearchBar.h" @implementation CZSearchBar - (instancetype)initWithFrame:(CGRect) ...

  8. QT绘制系统简介

    #3个类:QPainter,QPainterDevice 和 QPaintEngine 三个类 #qpainter用于执行绘制操作 #QPainterDevice是一个二维空间抽象,允许qpainte ...

  9. Eat Candy(暴力,水)

    Eat Candy Time Limit: 1 Sec  Memory Limit: 128 MBSubmit: 8  Solved: 6[Submit][Status][Web Board] Des ...

  10. IOS中的各种Picker

    简述 在应用的一些设置中经常要用到一些Picker来快速帮助用户选定取值,一般会用到的有UIDatePicker,UIPickerView以及UIImagePickerController. 初始界面 ...