|
||||||||||
MatchTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1378 Accepted Submission(s): 364 Problem Description There is a matrix of size n*n whose elements are either 0 or 1. Now your task is to find out that given a matrix of size m*m whose elements are also 0 or 1 whether it is a sub-matrix of the previous matrix. Input There is a matrix of size n*n whose elements are either 0 or 1. Now your task is to find out that given a matrix of size m*m whose elements are also 0 or 1 whether it is a sub-matrix of the previous matrix. Output If the second matrix is a sub-matrix of the first one, print ¡°Yes¡± on a single line. Otherwise print ¡°No¡±. Sample Input
Sample Output
Source | ||||||||||
|