zoukankan      html  css  js  c++  java
  • 力扣第887题 鸡蛋掉落

    力扣第887题 鸡蛋掉落

    class Solution {
    public:
        int superEggDrop(int K, int N) 
        {
            vector<vector<int>> dp(K+1, vector<int>(N+1, 0));
            int m = 0;
            for (; dp[K][m] < N;) {
                m++;
                for (int k = 1; k <= K; k++)
                    dp[k][m] = 1 + dp[k-1][m-1] + dp[k][m-1];
            }
            return m;
        }
    };
    
  • 相关阅读:
    day 01
    day14
    day12
    day13
    day11
    day9
    day10
    day08
    day07
    day06
  • 原文地址:https://www.cnblogs.com/woodjay/p/12683047.html
Copyright © 2011-2022 走看看