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/1416.Restore-The-Array at master · wisdompeak/LeetCode

Expand file tree

/

1416.Restore-The-Array

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
/

1416.Restore-The-Array

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
1416.Restore-The-Array.cpp
1416.Restore-The-Array.cpp
 
 
Readme.md
Readme.md
 
 

Readme.md

1416.Restore-The-Array

令dp[i]表示以第i个数字结尾的array有多少种。我们考察最后一个number是什么?显然只需要遍历最后一个number的范围s[j:i](最多不超过10个digit)。只要s[j:i]符合题目的要求(没有leading zero、在[1,k]之间),那么就可以更新dp[i]+=dp[j-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.