← All problemsSign in

Easy Pattern

Input n*n matrix and replace the corner elements by character first and boundary elements by character second. Rest all the elements should remain the same. FIRST CHARACTER: @ SECOND CHARACTER: ? ### Input - First line contains 'n' - Then 'n' lines follow with 'n' numbers in each line ### Output - output the required matrix. ### Constraints - $1 \leq n \leq 1000$ ### Subtasks - 30 points :

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