Hw7 ex1

You cannot submit for this problem because the homework's deadline is due.

Description

Read two matrices \(A\) and \(B\) from a text file called matrices.txt. Compute \(A + B\), \(A \cdot B\) and \(A^T \cdot B^T\). Output the result into a text file named result.txt. Each row of a matrix is represented as a list of integers separated by a space. When the end of a row is reached a new one starts on the next line. Two matrices are separated by a blank line.

Format

Files

You should submit a tar file containing a c source file ex1.c, which contains a function void ex1() that realizes the requirement as is specified in the description.

Input Files

two matrices in matrices.txt with order \(n \leqslant 500\)

Output Files

the result in result.txt

Sample 1

Input: matrices.txt

-80 8
21 9

-63 -85
81 -44

Output: result.txt

-143 -77 
102 -35 

5688 6448 
-594 -2181 

3255 -7404 
-1269 252 

Limitation

1s, 32MiB for each test case #1 ~ #9
2.5s, 32MiB for each test case #10

Homework 7

Not Claimed
Status
Finished
Problems
2
Open Since
2023-07-11 00:00
DDL
2023-07-18 23:59
Extension
48.0 hour(s)