2011年3月20日

摘要: 题目:http://acm.hdu.edu.cn/showproblem.php?pid=2206这道题要考虑的地方很多:1、是否含有除0-9、.之外的字符;2、.的个数是否是3个;3、4部分的数值是否都在0-255之间;4、是否有连续的.;考虑到这几个方面,基本上就能AC了。我测试了好多数据,终于AC了~~~我的AC代码:#include<stdio.h>#include<string.h>int IllegleChar(char c){ if((c>='0'&&c<='9')||c=='.' 阅读全文
posted @ 2011-03-20 21:04 江南烟雨hust 阅读(206) 评论(0) 推荐(0)
摘要: 题目啊:http://acm.hdu.edu.cn/showproblem.php?pid=1727我的方法很笨,不知道有没有什么好方法~~~这道题说实话,也不是很水,要考虑的方面其实很多的,我调了好半天,终于由WA变为AC,不容易啊~~~AC代码:#include<stdio.h>char s[10][10]={"zero","one","two","three","four","five","six","seven",& 阅读全文
posted @ 2011-03-20 20:01 江南烟雨hust 阅读(170) 评论(0) 推荐(0)
摘要: 题目:http://acm.hdu.edu.cn/showproblem.php?pid=1200AC代码:#include<stdio.h>#include<string.h>int main(){ int c,len,i,j,k,row,count,flag; char s1[201],p[21][201],s2[201]; while(scanf("%d",&c)!=EOF){ //c表示列数; getchar();//接受回车符; if(c==0){ break; } gets(s1); len=strlen(s1); i=0; ro 阅读全文
posted @ 2011-03-20 15:10 江南烟雨hust 阅读(196) 评论(0) 推荐(0)

导航