← All problemsSign in

The Grid Fill Problem

CodeChefRating 1393Open on judge ↗

You are given a $N$ $\times$ $N$ grid. You need to fill each cell of the grid with $1$ or $-1$. You need to fill the grid in a way such that the following conditions are met :- - For **every** column - (Sum of values present in the column) x (Product of values present in the column) < $0$ - For **every** row - (Sum of values present in the row) x (Product of values present in the row) < $0$ It i

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