Data Structured65_q1c_ice_cream
Ice Cream
0f2c5a20-e914-4a8f-b443-8e1e1cb9e5c7.cppC++
1// Loading code...Selected Submission
100 / 100
0.038s
2360 KB
P-QueueArray
Time Comp.
O(N log N + Q log N)
Space Comp.
O(N)
Readability
5/10
"The code utilizes a priority queue to manage plans with different rates and a vector to store the cumulative balance over time. It also employs binary search (lower_bound) to find the earliest day when the balance exceeds a given price, indicating the core algorithmic concepts used."
History
| Attempt | Points | Time ↓ |
|---|---|---|
| Try #13 | 100 | 9/9/2024 |
| Try #12 | 100 | 9/9/2024 |
| Try #11 | 100 | 9/9/2024 |
| Try #10 | 100 | 9/9/2024 |
| Try #9 | 100 | 9/9/2024 |
| Try #8 | 60 | 9/9/2024 |
| Try #7 | 100 | 9/9/2024 |
| Try #6 | 100 | 9/9/2024 |
| Try #5 | 100 | 9/9/2024 |
| Try #4 | 100 | 9/9/2024 |
| Try #3 | 100 | 9/9/2024 |
| Try #2 | 100 | 9/9/2024 |
| Try #1 | 0 | 9/9/2024 |