Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

INPUT Your program will be tested on one or more test cases. The first line of the input will be a single integer T ,

INPUT
Your program will be tested on one or more test cases. The first line of the input will be a single integer T,
the number of test cases (1T100). After that follow the specifications of T test cases. Each test case
starts with a line containing 2 integers separated by a single space N1 M1(1N130
representing the dimensions of the matrix A, followed by N1 lines containing M1 integers separated by
spaces. The j-th number in the i-th line is the number in the cell (i,j) in the matrix A. Followed by a line
contains 2 integers separated by a single space N2 M2(1N230 representing the
dimensions of the matrix B, followed by N2 lines contains M2 integers separated by spaces. The j-th
number in the i-th line is the number in the cell ((j,j) in the matrix B. Followed by a line containing an integer
Q, the number of queries, followed by Q lines, each line contains a single query of the previously defined.
OUTPUT
For each test case print the test case number, then print the result of each query. The output must not
contain empty lines between the cases.
NOTE:
it is guaranteed that all queries can be performed on the given matrices, so you do not have to check it
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

Find Vo in the network shown using source transformation 1KCA

Answered: 1 week ago

Question

1. Why is a critical path chart useful to potential investors?

Answered: 1 week ago

Question

=+7 What is the overall cost of the international assignment?

Answered: 1 week ago