雕刻时光

just do it……nothing impossible
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2012年3月10日

摘要: 3abxcybzca转化---->1 1 12 2 13 2 1i :1->nj:1->ndp[i][j]=min(dp[i][j],dp[i-1][j+1]);View Code #include<stdio.h>char map[1009][1009];int a[1009][1009];int min(int a,int b){ if(a>b)return b; else return a;} int main(){ int n; while(scanf("%d",&n)!=EOF) { if(n==0)return 0; 阅读全文

posted @ 2012-03-10 22:19 huhuuu 阅读(284) 评论(0) 推荐(0) 编辑

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=2855实际就是求fibonacci的2*n个用二分矩阵算View Code #include<stdio.h>#include<string.h>int mod;struct data{ int map[2][2];};data matrix(data a,data b)//矩阵乘法{ int n=2; int i,j,k; data re; for(i=0;i<n;i++) { for(j=0;j<n;j++) { int... 阅读全文

posted @ 2012-03-10 19:33 huhuuu 阅读(231) 评论(0) 推荐(0) 编辑