h7ex3: File I/O in C++

h7ex3: File I/O in C++

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 ex3.cpp

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.
10s, 32MiB for test case #10.

Assignment 7

Not Claimed
Status
Finished
Problems
4
Open Since
2018-07-17 00:00
DDL
2018-07-26 14:00
Extension
240.0 hour(s)