9466 - Matrix Multiplication   

Description

Input

First line contains a positive integer t (t <= 50), which indicates the numbers of test cases in the input. The first line of each test case contains three positive integers m, n, p (m, n, p <= 100) for the dimension of matrices. In the next m lines, each line contains n integers, representing the elements of matrix A. Followed by n lines, each line containing p integers, represent the elements of matrix B. All elements of A and B are integers in the range [-5, 5].


Case 1: m, n, p <= 20
Case 2: m, n, p <= 40
Case 3: m, n, p <= 60
Case 4: m, n, p <= 100

Output

Sample Input  Download

Sample Output  Download

Tags




Discuss