上一页 1 ··· 66 67 68 69 70 71 72 73 74 ··· 182 下一页
摘要: 矩阵乘法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)
摘要: 简单题View Code #include <iostream>#include <cstdlib>#include <cstring>#include <cstdio>#include <algorithm>using namespace std;struct Pallet{ int a, b;} pallet[10];bool operator <(const Pallet &p1, const Pallet &p2){ if (p1.a != p2.a) return p1.a < p2.a; ret 阅读全文
posted @ 2011-10-01 18:19 undefined2024 阅读(245) 评论(0) 推荐(0)
摘要: 排序View Code #include <iostream>#include <cstdlib>#include <cstring>#include <cstdio>#include <algorithm>using namespace std;#define maxn 1005#define maxl 100struct Word{ int id; int len;}word[maxn];int n, m;char st[maxn][maxl];bool vis[maxn];bool found;bool operator < 阅读全文
posted @ 2011-10-01 17:55 undefined2024 阅读(218) 评论(0) 推荐(0)
上一页 1 ··· 66 67 68 69 70 71 72 73 74 ··· 182 下一页