Problem A: Searching

Given a list of integers, find the maximum number.
Searching must be parallel.

Sample Input

10
1	6	53	34	98	34	678	23	23	98
    

Interpretation

Given a list of 10 integers, find the maximum.

Sample Output

678

Problem B: Sum

A box containing N particles have velocities v1, v2, ..., vN.
Find the Total Kinetic Energy, which is given by

E=i=1N2vi2.

Sum must be parallel.

Sample Input

10
34	89	45	234	78	90	56	43	76	89
    

Interpretation

Given a list of 10 floating point numbers, find E.

Sample Output

49362
    

Problem C: Matrix multiplication

Multiply 2 matrices of dimensions (NxN) containing integers and print the resulting matrix.
Parallel multiplication must be used.

Sample Input

4
1  2  3  4
5  6  7  8
9  10 11 12
13 14 15 16
17 18 19 20
21 22 23 24
25 26 27 28
29 30 31 32
	

Interpretation

Given 2 matrices (A,B) of size 4x4, find A*B.

Sample Output

250     260     270     280	
618     644     670     696	
986     1028    1070    1112	
1354    1412    1470    1528