← All problemsSign in

Min-Max Product Partition

CodeChefRating 2429Open on judge ↗

Consider an integer sequence $B$ of length $M$. We define a few terms. A *two-partition* of $B$ is an *ordered* pair of non-empty sets $(S, T)$ satisfying the following conditions: 1. $S\cup T = \{1, 2, 3, \ldots, M\}$ 2. $S\cap T = \emptyset$ The *score* of a two-partition $P = (S, T)$ is defined as $\text{score}(P) := \min_{i\in S} (B_i) \times \max_{j\in T} (B_j)$. That is, the score of a t

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start