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 ...
随机推荐
- [bzoj 1001][Beijing2006]狼抓兔子 (最小割+对偶图+最短路)
Description 现在小朋友们最喜欢的"喜羊羊与灰太狼",话说灰太狼抓羊不到,但抓兔子还是比较在行的, 而且现在的兔子还比较笨,它们只有两个窝,现在你做为狼王,面对下面这样一 ...
- 原 iOS面试题收集
原 iOS面试题收集 发表于2年前(2013-07-22 13:47) 阅读(369) | 评论(0) 4人收藏此文章, 我要收藏 赞0 听云性能监测产品App.Server.CDN免费试用,绑定 ...
- 《Programming WPF》翻译 第5章 3.命名属性
原文:<Programming WPF>翻译 第5章 3.命名属性 通过把同样的内嵌样式提升到资源中(正如第一章介绍的),我们可以给它一个名字,以及按名字使用它在我们的Button实例上, ...
- WPF笔记(2.8 常用的布局属性)——Layout
原文:WPF笔记(2.8 常用的布局属性)--Layout 这一节老没意思,啰里啰唆的尽是些HTML的属性,挑几个好玩的List出来,备忘:Padding与Margin的区别:Margin指控件边界与 ...
- openwrt下和云端通讯的例程,
openwrt下和云端通讯的例程 ibcurl 官方文档请参考这里 http://curl.haxx.se/libcurl/c/curl_easy_setopt.html 刚接触 libcurl的时候 ...
- Hdu3498-whosyourdaddy(精确覆盖模板题)
Problem Description sevenzero liked Warcraft very much, but he haven't practiced it for several year ...
- hdu 1159 Common Subsequence(LCS最长公共子序列)
Common Subsequence Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Other ...
- Linux CPU 亲和性
在Linux中,我们知道可以通过nice.renice命令改变进程的执行优先级,优先级高的进程优先执行,从而一定程度上保证重要任务的运行. 除了nice.renice外,可以通过CPU affinit ...
- WEB应用知识一二三
1.HTTP协议 |--基于请求(Request)和响应(Response)的无状态通讯协议 浏览器和WEB应用程序通过HTTP进行通信.客户端通过URL对指定服务器要求特定位置的数据 |--POST ...
- qt绘制设备
# -*- coding: utf-8 -*- # python:2.x __author__ = 'Administrator' from PyQt4.QtGui import * from Py ...