| # | Problem | Pass Rate (passed user / total user) |
|---|---|---|
| 12243 | CS_2018_SPRING_MID1-2 |
|
| 12258 | PME sim_test4 |
|
Description
Given a square matrix A and a smaller square matrix B inside A, print the location of B.
For example, if A is
1 2 3 4
5 6 7 8
8 7 6 5
4 3 2 1
and B is
7 8
6 5
, then the answer is
1 2
because B is in row 1 and column 2 in A.
Input
The first line contains two integers m and n, which are the sizes of A and B. (m and n <=20)
The following m lines contain the m rows of elements of A (each row has m integers).
The next n lines contain the n rows of elements of B (each row has n integers).
Output
The output is a line that contains two integers indicating the location of B in A.
The first integer is the row index and the second integer is the column index. The two integers are separated by a whitespace and there is a '\n' at the end of the line.