摘要:
矩阵乘法View Code #define w 2005struct Matrix{ int x, y; int num[5][5]; Matrix(int xx, int yy) { x = xx; y = yy; for (int i = 0; i < x; i++) for (int j = 0; j < y; j++) num[i][j] = 0; }};Matrix operator*(Matrix numa, Matrix numb){ Matrix n... 阅读全文
posted @ 2011-10-02 13:14
undefined2024
阅读(190)
评论(0)
推荐(0)
摘要:
简单题View Code #include <iostream>#include <cstdlib>#include <cstring>#include <cstdio>using namespace std;int n;int main(){ //freopen("t.txt", "r", stdin); while (scanf("%d", &n), n) { long long x = 0; while (x * 2 < n) x = x * 10 + 9; if ( 阅读全文
posted @ 2011-10-02 12:12
undefined2024
阅读(183)
评论(0)
推荐(0)
摘要:
先算0~a的各位数,再算b的,相减得结果View Code #include <iostream>#include <cstdlib>#include <cstring>#include <cstdio>using namespace std;#define maxn 1005long long f[maxn], g[maxn];void cal(int a, long long *f){ if (a == 0) return; long long x = 10; while (x <= a * 10) { long long count 阅读全文
posted @ 2011-10-02 11:46
undefined2024
阅读(194)
评论(0)
推荐(1)