hdu 1491 Octorber 21st
Octorber 21st
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 3688 Accepted Submission(s): 2268

#include<stdio.h>
#include<string.h>
#include<algorithm>
using namespace std;
int year[]={0,31,28,31,30,31,30,31,31,30,31,30,31};
int main()
{
int n,m,j,i,t,d;
scanf("%d",&t);
while(t--)
{
scanf("%d%d",&m,&d);
int sum=0;
if(m>10)
printf("What a pity, it has passed!\n");
else if(m==10&&d>21)
printf("What a pity, it has passed!\n");
else if(m==10&&d==21)
printf("It's today!!\n");
else if(m==10&&d<21)
printf("%d\n",21-d);
else
{
for(i=m;i<10;i++)
sum+=year[i];
sum+=21;
printf("%d\n",sum-d);
}
}
return 0;
}
hdu 1491 Octorber 21st的更多相关文章
- HDOJ(HDU) 1491 Octorber 21st
Problem Description HDU's 50th birthday, on Octorber 21st, is coming. What an exciting day!! As a st ...
- Octorber 21st
Octorber 21st Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Tot ...
- HDU 1498 50 years, 50 colors(最小点覆盖,坑称号)
50 years, 50 colors Problem Description On Octorber 21st, HDU 50-year-celebration, 50-color balloons ...
- 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 ...
- hdu 1498(最小点覆盖集)
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 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Othe ...
- HDU——T 1498 50 years, 50 colors
http://acm.hdu.edu.cn/showproblem.php?pid=1498 Time Limit: 2000/1000 MS (Java/Others) Memory Limi ...
随机推荐
- WebViewJavascriptBridge的基本原理
前言 WebViewJavascriptBridge是支持到iOS6之前的版本的,用于支持native的iOS与javascript交互.如果需要支持到iOS6之前的app,使用它是很不错的.本篇讲讲 ...
- PJSIP在windows(xp或者win7)下的编译,编译工具是vs2008,PJSIP版本2.3
PJSIP是一个开源的SIP协议库,它实现了SIP.SDP.RTP.STUN.TURN和ICE.PJSIP作为基于SIP的一个多媒体通信框架提供了非常清晰的API,以及NAT穿越的功能.PJSIP具有 ...
- 191. Number of 1 Bits
题目: Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also ...
- VLAN是什么
VLAN是什么?VLAN,是英文Virtual Local Area Network的缩写,中文名为"虚拟局域网", VLAN是一种将局域网(LAN)设备从逻辑上划分(注意,不是从 ...
- lib库依赖解决
当前环境之前是装过MySQL官方版本5.6.22,想测试Percona版本MySQL.启动Percona-MySQL报错. [root@dg7 support-files]# /etc/init.d/ ...
- javeWeb常用快捷键 Junit for changeableargs enumn reflect
*1 工具常用的快捷键 1) Eclipse和MyEclipse,IBM,2001,Java编写,开源,跨平台跨语言 2)Alt+/快速内容提示 3)Ctrl+1快速修补错误 4)Syso ...
- 【HDOJ】4370 0 or 1
挺有意思的题目.注意等式的条件.等式1实际表示点1的出度为1,等式2实际表示点2的入度为1,等式表示其它点为中间点,入度和出度相等.很容易转换成一条最短路.spfa直接可求,C即为邻接矩阵.同时,可能 ...
- Android开发之Bitmap.Config.RGB_565
在学习xutils框架的时候,看到sample代码中有一行这样的代码: bitmapUtils.configDefaultBitmapConfig(Bitmap.Config.RGB_565); Bi ...
- python web开发遇到socket.error[errno 10013]
socket.error[errno 10013],端口被占用 重新换一个端口,或者把占用该端口的程序关闭就可以了
- Dapper连接Oracle
Dapper连接Oracle去年写过了篇博客,名字叫:让dapper支持Oracle 网址:http://www.cnblogs.com/ushou/archive/2012/09/28/270690 ...