Category

Similar Problems

0140. Matritsa11

Time limit : 1000 ms
Memory limit : 64 mb

Matritsani matritsaga ko`paytirish dasturi tuzilsin.


Kiruvchi ma`lumotlar: Birinchi satrda $n$ va $m$ birinchi matritsa o`lchamlari ($1\le n,m\le 50$). Keyingi $n$ ta satrda $m$ ta butun son birinchi matritsa elementlari ($-100\le a[i][j] \le 100$). Keyingi satrda $x$ va $y$ ikkinchi matritsa o`lchamlari ($1\le x,y \le50$) Keyingi $x$ ta satrda $y$ ta butun son ikkinchi matritsa elementlari ($m = x$)


Chiquvchi ma`lumotlar: Xosil bo`lgan matritsa

Input
2 3
57 17 54
86 4 52
3 6
93 87 74 26 15 72
37 67 96 6 96 94
24 79 63 38 21 63
Output
7226 10364 9252 3636 3621 9104
9394 11858 10024 4236 2766 9844
Input
2 3
62 40 15
63 50 6
3 2
36 52
21 59
4 66
Output
3132 6574
3342 6622