← All problemsSign in

XOR maximum-minimum matrices

CodeChefRating 3629Open on judge ↗

Chef has an integer matrix $A$ of $N$ rows and $M$ columns, and an integer $X$. A **submatrix** is defined as a rectangle of values inside $A$. More formally, given two intervals $[l, r]$ and $[L, R]$, the corresponding submatrix consists of the values $a_{ij}$ such that $l\le i\le r$ and $L\le j\le R$. Two submatrices are considered different if one of the ranges $[l,r]$ or $[L,R]$ differs.

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