hdu 2043
Ps:自己写了以后又去看了下苏哥的....改进版的....学到东西,直接套用了.
代码:
#include "stdio.h"
#include "string.h"
int main(){
int i,s,n,dx,xx,sz,fh;
char a[110];
scanf("%d",&n);
while(n--){
scanf("%s",&a);
s=strlen(a);
if(s<8 || s>16){
printf("NO\n");
continue;
}
dx=xx=sz=fh=0;
for(i=0;i<s;i++){
if(a[i]<='Z' && 'A'<=a[i]) dx=1;
else if(a[i]<='z' && 'a'<=a[i]) xx=1;
else if(a[i]<='9' && '0'<=a[i]) sz=1;
else fh=1;
}
puts(dx+xx+sz+fh>=3?"YES":"NO");
}
return 0;
}
hdu 2043的更多相关文章
- HDU 2043 密码
http://acm.hdu.edu.cn/showproblem.php?pid=2043 Problem Description 网上流传一句话:"常在网上飘啊,哪能不挨刀啊-" ...
- HDU - 2043密码 水题
密码 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submissi ...
- 致初学者(三): HDU 2033~ 2043题解
下面继续给出HDU 2033~2043的AC程序,供大家参考.2033~2043这10道题就被归结为“ACM程序设计期末考试(2006/06/07) ”和“2005实验班短学期考试 ”. HDU 20 ...
- HDU——PKU题目分类
HDU 模拟题, 枚举1002 1004 1013 1015 1017 1020 1022 1029 1031 1033 1034 1035 1036 1037 1039 1042 1047 1048 ...
- [转] HDU 题目分类
转载来自:http://www.cppblog.com/acronix/archive/2010/09/24/127536.aspx 分类一: 基础题:1000.1001.1004.1005.1008 ...
- HDU ACM 题目分类
模拟题, 枚举1002 1004 1013 1015 1017 1020 1022 1029 1031 1033 1034 1035 1036 1037 1039 1042 1047 1048 104 ...
- HDU 5643 King's Game 打表
King's Game 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5643 Description In order to remember hi ...
- 转载:hdu 题目分类 (侵删)
转载:from http://blog.csdn.net/qq_28236309/article/details/47818349 基础题:1000.1001.1004.1005.1008.1012. ...
- poj和hdu部分基础算法分类及难度排序
最近想从头开始刷点基础些的题,正好有个网站有关于各大oj的题目分类(http://www.pythontip.com/acm/problemCategory),所以写了点脚本把hdu和poj的一些题目 ...
随机推荐
- 清理无用的CSS样式的几个工具(转)
欢迎和大家交流技术相关问题: 邮箱: jiangxinnju@163.com 博客园地址: http://www.cnblogs.com/jiangxinnju GitHub地址: https://g ...
- 安装 request模块
python3 requests 安装包下载安装[windows] 听语音 | 浏览:54 | 更新:2016-07-25 17:09 windows下直接使用:easy_install reques ...
- uva---(11549)CALCULATOR CONUNDRUM
Problem C CALCULATOR CONUNDRUM Alice got a hold of an old calculator that can display n digits. She ...
- Android之ScrollView嵌套ListView
在ScrollView中嵌套使用ListView,ListView只会显示的内容只有一行多一点 解决方案: public class Utility { public void setListView ...
- php提示Fatal error: Call to undefined function imagecreate()
在php中imagecreate函数是一个图形处理函数,主要用于新建一个基于调色板的图像了,然后在这个基础上我们可以创建一些图形数字字符之类的,但这个函数需要GD库支持,如果没有开启GD库使用时会 / ...
- MongoDB 一对多关系建模
转文: 本篇博客翻译自: http://blog.mongodb.org/post/87200945828/6-rules-of-thumb-for-mongodb-schema-design-par ...
- 隐藏chrome空白标签栏的最近访问
chrome版本: 29.0.1547.76 m 找到安装路径下Custom.css文件,添加.most-visited{display:none !important}来修改样式. 我的路径为:C: ...
- display和visibility的区别
一.display和visibility的相同与不同点 1.相同点:display和visibility都有讲元素隐藏的意思 2.不同点:display是元素隐藏,隐藏的元素不占文档流 而visibi ...
- myeclipse设置编码格式的4种情况
(1).设置myeclipse工作空间的编码格式,作用范围最大 window-->preference-->general-->workspace-->text file en ...
- C#语法小用法
数据在存为数据库之前,用JS的encodeURIComponent进行编码,现需要在后台代码中进行解码,实现decodeURIComponent的功能, 如下: HttpUtility.UrlDeco ...