Minimax
CodeChefOpen on judge ↗
Let's consider a square grid with N rows and N columns, both numbered 1 through N. Each cell contains one integer. Let ri denote the minimum value in the i-th row, and let Ci denote the maximum value in the i-th column. A grid is called nice if and only if the following condition holds true: max(r1, r2, ..., rN) = min(C1, C2, ..., CN) Chef has a square grid and can change some of its elements
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.
Sign in to chat with the tutor and save your progress.
Sign in to start