02 2012 档案
摘要:// HDOJ 1097 A hard puzzle // @author: bos // @date: 2012.2.17 //类似1061的题目 //好像用到了拉格朗日的不知道什么定理 //在《算法导论》里有,有机会借一本来看 #include #include int main() { _int64 a, b; while (scanf("%I64d%I64d", &a, &b)...
阅读全文
摘要:// HDOJ 2015 偶数求和 // @author: bos // @date: 2012.2.16 #include <stdio.h> int main() { int n, m; while(scanf("%d%d", &n, &m)!= EOF) { int i; int j= 0;
阅读全文
摘要:// HDOJ 2007 平方和与立方和 // @author: bos // @date: 2012.2.16 #include int main() { long m, n; while(scanf("%ld%ld", &m, &n)!= EOF) { int t; if(m> n) {t= m; m= n; n= t;} long x= 0; long y= 0;...
阅读全文
摘要:// HDOJ 2008 数值统计 // @author: bos // @date: 2012.2.16 #include <stdio.h> int main() { int n; double a[100]; int count1; int count2; int count3; while(
阅读全文
摘要:// HDOJ 2006 求奇数的成绩 // @author: bos // @date: 2012.2.16 #include <stdio.h> int main() { int n; int a[100000]; int result; while (scanf("%d", &n)!= EOF
阅读全文
摘要:// HDOJ 2101 A + B Problem Too // @author: bos // @date: 2012.2.14 #include <stdio.h> int main() { int a, b; while(scanf("%d%d", &a, &b)!= EOF) { if((
阅读全文
摘要:// HDOJ 2001 计算两点间的距离 // @author: bos // @date: 2012.2.14 #include <stdio.h> #include <math.h> int main() { double x1, x2, y1, y2; while(scanf("%lf%lf
阅读全文
摘要:// HDOJ 2002 计算球体积 // @author: bos // @date: 2012.2.14 #define PI 3.1415927 #include <stdio.h> int main() { double r; while(scanf("%lf", &r)!= EOF) {
阅读全文
摘要:// HDOJ 2003 求绝对值 // @author: bos // @date: 2012.2.14 #include <stdio.h> int main() { double n; //需用double型才行 while(scanf("%lf", &n)!= EOF) { printf("
阅读全文
摘要:// HDOJ 2046 骨牌铺方格 // @author: bos // @date: 2012.2.13 #include <stdio.h> int main() { int n; int i; _int64 result[51]= {0}; result[1]= 1; result[2]=
阅读全文
摘要:// HDOJ 2018 母牛的故事 // @author: bos // @date: 2012.2.13 #include <stdio.h> int main() { int n; int i; int result[55]; result[1]= 1; result[2]= 2; resul
阅读全文
摘要:// HDOJ 1465 不容易系列之一 // @author: bos // @date: 2012.2.9 //错排问题 #include #include int main() { int n; _int64 f[21]= {0}; //注意这里用到C++的扩展类型_int64,表示范围更大,关于它 while(scanf("%d", &n)!= EOF) //跟long...
阅读全文
摘要:2012-02-06 16:25:29
阅读全文
摘要:2012-02-06 16:23:20
阅读全文
摘要:// HDOJ 1425 sort// @author: bos// @date: 2012.2.6//用哈希表解决#include<stdio.h>#include<memory.h>int num[1000001]= {0};int main(){ int n, m; int input; wh
阅读全文

浙公网安备 33010602011771号