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






Nightfury.Tiger

 
 

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

2020年10月23日

洛谷 P1464 Function
摘要: 做笔记:记忆化搜索的语法 #include<iostream> #include<cstdio> #define ll long long using namespace std; ll temp[55][55][55]; int w(ll a,ll b,ll c) { if(a<=0||b<=0| 阅读全文
posted @ 2020-10-23 19:57 Nightfury.Tiger 阅读(151) 评论(0) 推荐(0)
 
斐波那契递归升级
摘要: 用dp [ i ]存放数列第 i 项,避免了每次递归时都要重复计算海量的项 运行时间从9s提升到0.001s #include<iostream> #include<ctime> using namespace std; int dp[55]; int f(int x) { if(x==1||x== 阅读全文
posted @ 2020-10-23 19:55 Nightfury.Tiger 阅读(97) 评论(0) 推荐(0)