GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — LeetCode/Dynamic_Programming/1463.Cherry-Pickup-II at master · wisdompeak/LeetCode

Expand file tree

/

1463.Cherry-Pickup-II

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
/

1463.Cherry-Pickup-II

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
1463.Cherry-Pickup-II.cpp
1463.Cherry-Pickup-II.cpp
 
 
Readme.md
Readme.md
 
 

Readme.md

1463.Cherry-Pickup-II

相比于741.Cherry-Pickup,这题的解法对于DP的倾向性更加明显,因为这题有非常显著的“轮次”的特点:每走一步就下降一行。这一行(两个机器人)的选择,取决于上一行(两个机器人)的选择。因此我们设计dp[i][j]表示在当前行、两个机器人分别在横坐标位置i和j时,此时的最大收益。我们接下来只需要考虑上一行里,哪些dp[a][b]可以转移到这一行的dp[i][j]。因为每次横向移动的氛围只有-1到1,所以枚举一下就行啦。

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.