• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
 






Siriuslzx

 
 

Powered by 博客园
博客园 | 首页 | 新随笔 | 联系 | 订阅 订阅 | 管理

2012年7月19日

poj - 1651 Multiplication Puzzle
摘要: 简单DP,矩阵相乘,这次尝试自己写一个,居然过了,很好。本来今天还水了poj 1088 二维空间最长下降(上升)序列和 poj 3624 超水0,1背包,也想贴出来凑数的,可是zxpn同志说,这么水的题你也好意思贴出来,只好做罢。 1 #include <stdio.h> 2 #include <string.h> 3 int f[100][100],a[105]; 4 int dp(int i,int j) 5 { 6 int k, min, &ans = f[i][j]; 7 if(f[i][j] != -1) 8 return ans; 9 if(... 阅读全文
posted @ 2012-07-19 23:23 Siriuslzx 阅读(184) 评论(0) 推荐(0)
 
poj - 1887 Testing the CATCHER
摘要: 曾经的WF题,如今我一个小菜鸟都能做出来了,可见时代在进步啊。这题用nlogn算法做的,由于不知道有多少个数,所以数组要开大些,反正我随便开了一个是够了。 1 #include <stdio.h> 2 #include <string.h> 3 int c[2000],len=-1; 4 int find(int t) 5 { 6 int le=0,ri=len,mid; 7 while(le <= ri) 8 { 9 mid = (le+ri) >> 1;10 if(c[mid] == t)11 return m... 阅读全文
posted @ 2012-07-19 23:18 Siriuslzx 阅读(274) 评论(0) 推荐(0)