2012年9月22日
摘要: 原来double可以存储比__int64更大的数(int)(pow(p, 1.0/n) + 0.5)CODE:#include<iostream>#include<cstdlib>#include<cstring>#include<cstdio>#include<cmath>usingnamespacestd;intmain(){doublen,p;while(~scanf("%lf%lf",&n,&p)){doubleans=(int)(pow(p,1.0/n)+0.5);printf(" 阅读全文
posted @ 2012-09-22 18:01 有间博客 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 附录1:上机练习题参考题1.Programming BasicSicily 1830 SZ Fibonacci Sequence,递归函数,难度0Sicily 1795 Table tennis,几何题,难度0Sicily 1798 Alice and Bob,策略,难度0Sicily 1561 PRIME Number,难度1Sicily 1007 To and Fro,数组与下标(二维数组),难度1Sicily 1036 Crypto Columns,二维数组,字符串,排序,难度1Sicily 1813 M进制数问题,难度1Sicily 1814日期计算问题1.1直接枚举uva 1016. 阅读全文
posted @ 2012-09-22 16:47 有间博客 阅读(2723) 评论(0) 推荐(0) 编辑
摘要: 字符串处理。CODE:#include<iostream>#include<cstdlib>#include<cstdio>#include<ctype.h>#include<cstring>usingnamespacestd;charss[27]="A3HILJMO2TUVWXY5";charsd[10]="1SEZ8";intcheck1(char*str){intlen=strlen(str);for(inti=0;i<=len/2;i++){if(str[i]!=str[len-i 阅读全文
posted @ 2012-09-22 16:35 有间博客 阅读(238) 评论(0) 推荐(0) 编辑