← All problemsSign in

Easy (Challenge)

Chef is trying to cook a new dish. This is the type of the dish that even Gordan Ramsay cannot resist. The dish can be represented as a square matrix of $N$ × $N$. The elements of the matrix represents the ingredients. There are a total of $30$ distinct ingredients numbered from 1 to 30. (Ingredients maybe repeated in a dish). The Prime Minister of Chef Land is visiting to taste the Chef's dish.

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