摘要: 就当是练习了(各种高精度)!综合很强!View Code #include"iostream"#define M 1010using namespace std;char ch1[M],ch2[M];int a[M],b[M];int c[M],d[M];int num[M];int sum[M];int W[M];int H[M];int t,k,g,v;int i,j;int La,Lb;int sign=0;int s;int L;void _ADD(){ La=0; W[La++]=(sum[L-1]+1)%10; int flag=(sum[L-1]+1)/10; 阅读全文
posted @ 2011-05-02 20:57 聊聊IT那些事 阅读(262) 评论(1) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1402我的代码,由于时间的问题,以后找机会优化了!(超时)View Code #include"iostream"#define M 100010using namespace std;char ch1[M],ch2[M];int a[M],b[M];int c[M],d[M];int num[M];int H[M];int t,k,g,v;int i,j;int La,Lb;int sign=0;void Add(int x ,int y){ sign=0; t=0; int p,q,f 阅读全文
posted @ 2011-05-02 17:35 聊聊IT那些事 阅读(287) 评论(1) 推荐(0) 编辑
摘要: http://acm.fzu.edu.cn/problem.php?pid=2024View Code #include<stdio.h>#include<string.h>#define M 1010int c[M][M];int f[M][M];int min(int a,int b,int c){ int z=(a<b)?a:b; if(z<c)return z; else return c;}int Max(int a ,int b){return a>b?a:b;}void LCS(char aa[], char bb[], int x, i 阅读全文
posted @ 2011-05-02 09:15 聊聊IT那些事 阅读(212) 评论(0) 推荐(0) 编辑