• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
mengxm
博客园    首页    新随笔    联系   管理    订阅  订阅
2012年2月6日
poj3233
摘要: 矩阵+二分,建议用面向对象思想#include <iostream>#include <cstdio>#include <cstring>using namespace std;int m,n,K;int a[30][30];class Matrix{ public: int num[4*30][4*30]; Matrix() { memset(num,0,sizeof(num)); } void print() { for(int i=0;i<n;++i) { printf("%d",n... 阅读全文
posted @ 2012-02-06 21:54 mengxm 阅读(464) 评论(1) 推荐(0)
poj3070
摘要: 矩阵+二分练手#include <stdio.h>#include <string.h>#define MAXN 2#define MOD(a) ((a)%10000)void MatrixMul(int max0[][MAXN],int max1[][MAXN],int max2[][MAXN]){ for(int i=0;i<2;++i) for(int j=0;j<2;++j) { for(int k=0;k<2;++k) max2[i][j]+=MOD(max0[i][k]*max1[k][j]); ... 阅读全文
posted @ 2012-02-06 20:16 mengxm 阅读(437) 评论(0) 推荐(1)
poj3982
摘要: 许久没有做acm,现在重头开始学啊大数摸加,练手#include <stdio.h>#include <string.h>#include <math.h>#define MAXN 100#define digit(a) (a-'0')bool Read(int num[]){ char str[MAXN]; if(scanf("%s",str)==EOF) return false; num[0]=strlen(str)/4+(strlen(str)%4?1:0); int i=strlen(str),j=0; whil 阅读全文
posted @ 2012-02-06 18:56 mengxm 阅读(238) 评论(0) 推荐(0)
博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3