Last Updated: 17 Mar, 2018

Idempotent Matrix

Easy
Asked in companies
MeeshoMr. CooperJio Platforms Limited

Problem statement

Given a N * N matrix and the task is to check matrix is idempotent matrix or not.

See the sample input.

Idempotent matrix M follows the following property :

M*M = M
Input format :
Line 1 : Size N of the matrix
Line 2 to N + 1 : NXN elements of the matrix
Output Format :
 true or false
Constraints :
 1 <= N <= 10^3