摘要: 简单题先把小数点去掉(乘以10的若干次幂),按整数计算,然后再计算有多少小数位即可。View Code #include <iostream>#include <string>using namespace std;const int w = 100000, maxn = 300, ww = 5;string st, ansst;int pointpos, n, fac;long long ans[maxn];void init(){ int i, x = 0; pointpos = 0; for (i = 0; i < 6; i++) { if (st[... 阅读全文
posted @ 2012-11-25 14:48 undefined2024 阅读(165) 评论(0) 推荐(0)
摘要: a+b problemView Code #include <iostream>using namespace std;int main(){ int a,b; cin >> a >> b; cout << a+b << endl; return 0;} 阅读全文
posted @ 2012-11-25 14:42 undefined2024 阅读(352) 评论(0) 推荐(0)
摘要: 最长公共子序列View Code #include <iostream>#include <string>using namespace std;const int maxn = 1000, maxm = 1000;int n, m, f[maxn][maxm];string a, b;void work(){ int i, j; f[0][0] = 0; for (i = 1; i <= n; i++) f[i][0] = 0; for (i = 1; i <= m; i++) ... 阅读全文
posted @ 2012-11-25 14:40 undefined2024 阅读(494) 评论(0) 推荐(0)