#include <stdio.h>
void array_mul( int (*x)[2], int (*y)[2], int (*ans)[2] );
int main(void) {
// your code goes here
int x[2][2]={{1,2},
{3,4}};
int y[2][2]={{1,2},
{3,4}};
int ans[2][2]={0};
array_mul(x,y,ans);
for(int i=0;i<2;i++){
for(int j=0;j<2;j++){
}
return 0;
}
void array_mul( int (*x)[2], int (*y)[2], int (*ans)[2] ){
int i,j,k;
for(i=0;i<2;i++){
for(j=0;j<2;j++){
ans[i][j]=0;
for(k=0;k<2;k++){
ans[i][j]=ans[i][j]+x[i][k]*y[k][j];
}
}
}
}
I2luY2x1ZGUgPHN0ZGlvLmg+CnZvaWQgYXJyYXlfbXVsKCBpbnQgKCp4KVsyXSwgaW50ICgqeSlbMl0sIGludCAoKmFucylbMl0gKTsKaW50IG1haW4odm9pZCkgewoJLy8geW91ciBjb2RlIGdvZXMgaGVyZQoJaW50IHhbMl1bMl09e3sxLDJ9LAogICAgICAgICAgICAgICB7Myw0fX07CiAgICBpbnQgeVsyXVsyXT17ezEsMn0sCiAgICAJCSAgIHszLDR9fTsKICAgIGludCBhbnNbMl1bMl09ezB9OwogICAgYXJyYXlfbXVsKHgseSxhbnMpOwogICAgZm9yKGludCBpPTA7aTwyO2krKyl7CiAgICAJZm9yKGludCBqPTA7ajwyO2orKyl7CiAgICAJCXByaW50ZigiJWQiLGFuc1tpXVtqXSk7CiAgICAJfXByaW50ZigiXG4iKTsKICAgIH0KICAgIAoJcmV0dXJuIDA7Cn0Kdm9pZCBhcnJheV9tdWwoIGludCAoKngpWzJdLCBpbnQgKCp5KVsyXSwgaW50ICgqYW5zKVsyXSApewoJaW50IGksaixrOwoJZm9yKGk9MDtpPDI7aSsrKXsKCQlmb3Ioaj0wO2o8MjtqKyspewoJCQlhbnNbaV1bal09MDsKCQkJZm9yKGs9MDtrPDI7aysrKXsKCQkJCWFuc1tpXVtqXT1hbnNbaV1bal0reFtpXVtrXSp5W2tdW2pdOwoJCQl9CgkJfQoJfQp9Cg==