Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

结论 #104

Open
Wizmann opened this issue May 11, 2021 · 0 comments
Open

结论 #104

Wizmann opened this issue May 11, 2021 · 0 comments

Comments

@Wizmann
Copy link
Owner

Wizmann commented May 11, 2021

Table of Contents

基础数学

  • 平方和公式:n * (n + 1) * (2n + 1) / 6
  • 大于3的所有质数都可以表示为 6n - 16n + 1 (n >= 1)

组合数学

  • 隔板法
    • N个球,M个盒子,不允许空盒子
      • 问题等价于求x1 + x2 + x3 ... xM =N (xi > 0) 的可行解数
      • C(N - 1, M - 1)
    • N个球,M个盒子,允许空盒子
      • C(N + M - 1, M - 1)

基础算法

尺取法

单调队列

动态规划

  • 解决无后效问题,重点是找到状态,以及状态之间的转移
  • 同时要注意时间复杂度和空间复杂度

动态规划的优化

图论

解题思路

偷鸡摸狗

位运算相关

@Wizmann Wizmann pinned this issue May 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant