andre_joy

导航

2012年8月29日

UVaOJ 10106

摘要: 地址:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1047题意:大数乘法代码:#include <stdio.h>#include <string.h>#include <stdlib.h>char a[260],b[260];int x[260], y[260], mut[610];int main(){ while(~scanf("%s%s", a, b)) { me 阅读全文

posted @ 2012-08-29 15:55 andre_joy 阅读(152) 评论(0) 推荐(0) 编辑

UVaOJ 424

摘要: 地址:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=97&page=show_problem&problem=365题意:求大数a+b代码:#include <stdio.h>#include <string.h>#include <stdlib.h>char a[200], sum[200];int main(){ int le,i,j,k; memset(sum, '0', sizeof(sum)) 阅读全文

posted @ 2012-08-29 15:31 andre_joy 阅读(176) 评论(0) 推荐(0) 编辑

hdu 1010

摘要: 地址:http://acm.hdu.edu.cn/showproblem.php?pid=1010题意:迷宫,是否能恰好t步走到终点。mark:奇偶剪枝法!!!这篇博客写的不错http://www.cppblog.com/Geek/archive/2010/04/26/113615.html代码:#include <stdio.h>#include <string.h>#include <stdlib.h>int n,m,t,sum,flag;char a[10][10];int s1,s2,d1,d2;int tab[4][2] = {1, 0, -1, 阅读全文

posted @ 2012-08-29 14:31 andre_joy 阅读(103) 评论(0) 推荐(0) 编辑

hdu 1059

摘要: 地址:http://acm.hdu.edu.cn/showproblem.php?pid=1059题意:有价值为1,2,……,6的大理石各若干个,求是否能平分给两个人。mark:看别人说多重背包,一直不知道在说什么。后来终于懂了,把总价值平分,往背包里放东西,如果最后恰好等于总价值的一半,那么就可以放进去。 这个代码就当模版用了。。代码:#include <stdio.h>#include <string.h>#include <stdlib.h>int a[7], vmax;int dp[120010];int max(int a, int b) {ret 阅读全文

posted @ 2012-08-29 10:58 andre_joy 阅读(156) 评论(0) 推荐(0) 编辑