Omi and matrix
CodeChefOpen on judge ↗
Omi gave Ish a $2$-$D$ matrix $A$ of size $N$ * $N$ and asked him to find a $1$-$D$ matrix $B$ of size $N$ where $A[i][j]$ represents the logical $AND$ of $B[i]$ and $B[j]$. Omi is smart enough and he know that logical $AND$ of a number with itself is that number so he filled the primary diagonal of the matrix with $-1$. As there are many ways to form the matrix $B$, so you have to find the minimu
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