1680 - PME sim20190507 Scoreboard

Time

2019/05/07 14:30:00 2019/05/07 16:30:00

Clarification

# Problem Asker Description Reply Replier Reply Time For all team

# Problem Pass Rate (passed user / total user)
12243 CS_2018_SPRING_MID1-2
12258 PME sim_test4

12243 - CS_2018_SPRING_MID1-2   

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.

 

Sample Input  Download

Sample Output  Download

Tags




Discuss




12258 - PME sim_test4   

Description

判斷括號是否對稱,請參照投影片內容。

Input

Output

Sample Input  Download

Sample Output  Download

Tags




Discuss