Algorithm Designex03m3
Pressure Station
e871ea25-4e65-470d-b891-53e5b75ad7d1.cppC++
1// Loading code...Selected Submission
100 / 100
0.015s
1596 KB
DPImplementation
Time Comp.
O(n*r)
Space Comp.
O(n)
Readability
5/10
"The code uses dynamic programming to find the minimum cost to reach the end of an array, considering a limited 'jump' range (rad). It builds up a `dp` array where `dp[i]` stores the minimum cost to reach index `i`."
History
| Attempt | Points | Time ↓ |
|---|---|---|
| Try #15 | 100 | 2/25/2025 |
| Try #14 | 95 | 2/25/2025 |
| Try #13 | 0 | 2/25/2025 |
| Try #12 | 95 | 2/25/2025 |
| Try #11 | 80 | 2/25/2025 |
| Try #10 | 65 | 2/25/2025 |
| Try #9 | 60 | 2/25/2025 |
| Try #8 | 70 | 2/25/2025 |
| Try #7 | 70 | 2/25/2025 |
| Try #6 | 0 | 2/25/2025 |
| Try #5 | 65 | 2/25/2025 |
| Try #4 | 0 | 2/25/2025 |
| Try #3 | 30 | 2/25/2025 |
| Try #2 | 30 | 2/25/2025 |
| Try #1 | 30 | 2/25/2025 |