CustomCC0-1.0#ct-p2-011600
Minimum Daily Capacity
Summary
- •Phase 2 / binary-search-answer
- •Reasoning-first competitive programming drill
Problem Description
Ship packages in order within d days. Find minimum ship capacity. Your submission must justify algorithm choice, prove correctness, and test adversarial edge cases.
How to read this problem in plain language:
- This is a Phase 2 reasoning drill focused on binary-search-answer.
- Typical lenses to test first: binary-search, greedy, monotonicity.
- Constraints reminder: 1 <= n <= 2e5, weight <= 1e9
Mini examples for mental simulation:
1) Boundary example: Capacity must be total sum. Explain expected behavior and why naive logic may fail.
2) Adversarial example: Capacity equals maximum single weight.
Lite-mode writing target:
- Write 1~2 observations that shrink the search space.
- Name one final algorithm and state target complexity explicitly.
- Validate with at least 2 edge cases and one hand simulation.
Constraints
- •1 <= n <= 2e5, weight <= 1e9
Analysis
Key Insight
Each check O(n), multiplied by log answer range.
binary-searchgreedymonotonicity