Rust dp solution
\nimpl Solution {\n    pub fn new21_game(n: i32, k: i32, max_pts: i32) -> f64 {\n        let (n, k, max_pts) = (n as usize, k as usize, max_pts as usize);\n    
```\nimpl Solution {\n    pub fn new21_game(n: i32, k: i32, max_pts: i32) -> f64 {\n        let (n, k, max_pts) = (n as usize, k as usize, max_pts as usize);\n        let total_max_pts = k + max_pts;\n        let mut dp: Vec<f64> = Vec::with_capacity(total_max_pts);\n        let mut sum: f64 = 0.0;\n        dp.push(1.0);\n        for i in 1..total_max_pts {\n            if i < k + 1 {\n                sum += dp[i-1];\n            }\n            if i > max_pts {\n                sum -= dp[i-max_pts-1];\n            }\n            dp.push(sum / max_pts as f64);\n        }\n        dp.into_iter().take(n+1).skip(k).sum()\n    }\n}\n```\n
['Dynamic Programming', 'Rust']