← All problemsSign in

Sereja and Functions (Challenge)

CodeChefRating 3775Open on judge ↗

Sereja is stuck with a problem and asks for your help. You readily agree to help Sereja and he poses the following problem to you. Sereja has a matrix A of size N x N. Each cell in row i and column j contains a number A[i][j]. Every element of the matrix can either be 0 or 1. Initially, all the elements are zero. Sereja informs you that he only likes the functions of the form Here the divisi

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