Octorber 21st
Octorber 21st
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 3534 Accepted Submission(s):
2174
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.
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(合法).
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!!".
#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的更多相关文章
- hdu 1491 Octorber 21st
Octorber 21st Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Tot ...
- HDOJ(HDU) 1491 Octorber 21st
Problem Description HDU's 50th birthday, on Octorber 21st, is coming. What an exciting day!! As a st ...
- hdu----149850 years, 50 colors(最小覆盖点)
50 years, 50 colors Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Othe ...
- HDU 1498 50 years, 50 colors(最小点覆盖,坑称号)
50 years, 50 colors Problem Description On Octorber 21st, HDU 50-year-celebration, 50-color balloons ...
- hdu149850 years, 50 colors (多个最小顶点覆盖)
50 years, 50 colors Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) ...
- 50 years, 50 colors
50 years, 50 colors Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) ...
- hdu 1498 50 years, 50 colors 最小点覆盖
50 years, 50 colors Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Othe ...
- 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 ...
- 50 years, 50 colors HDU - 1498(最小点覆盖或者说最小顶点匹配)
On Octorber 21st, HDU 50-year-celebration, 50-color balloons floating around the campus, it's so nic ...
随机推荐
- 使用SALT-API进入集成开发的简单样例
测试的时候,可以CURL -K,但真正作集成的时候,却是不可以的. 必须,不可以让TOKEN满天飞吧. 现在进入这个阶段了.写个样例先: import salt import salt.auth im ...
- 【转】Android HAL实例解析
原文网址:http://www.embedu.org/Column/Column339.htm 作者:刘老师,华清远见嵌入式学院讲师. 一.概述 本文希望通过分析台湾的Jollen的mokoid 工程 ...
- Java异常的使用
1.exception的分类 java将异常分为两种,checked exception和unchecked exception(一般指runtimeException). checked excep ...
- Using HTML5 audio and video
From:https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Using_HTML5_audio_and_video Using HTML5 ...
- 最简单的XML转数组
/** * 最简单的XML转数组 * @param string $xmlstring XML字符串 * @return array XML数组 */ function simplest_xml_to ...
- eclipse配置maven + 创建maven项目
登录|注册 努力+坚持,而且还很年轻 目录(?)[+] 在现实的企业中,以低成本.高效率.高质量的完成项目,不仅仅需要技术大牛,企业更加需要管理大牛,管理者只懂技术是远远不够的.当 ...
- Angular Textarea 高度自动变化
很多前端开发的朋友可能都会遇到textarea 输入框的高度不能自动随着用户的输入变化的问题,今儿小生也遇到了, 并通过网络上的信息解决了这个问题,于是将解决方法贴上,以作备忘. directiveA ...
- Linux下Samba的配置
前言: 为了实现windows 和 Linux以及其它操作系统之间的资源共享,软件商推出nfs 和samba两种解决方案.因为市场上缺乏象pc-nfs那样的client工具,使得Linux和windo ...
- linux ssh-keygen
用ssh client 客户端 远程登录服务器,避免每次都得输入密码: 解决方法: ssh-keygen 复制 id_rsa.pub 中的内容 到 远程连接的服务器的~/.ssh/authorize ...
- el表达式判断是否相等
<c:if test="${order.baofang eq 0 }"> 无包间 </c:if> <c:if test="${order.b ...