#include <stdio.h>
void calculation(int (*x)[2],int (*y)[2],int (*ans)[2]);
int main(void) {
int x[2][2]={1,2,3,4};
int y[2][2]={1,2,3,4};
int ans[2][2]={0};
calculation(x,y,ans);
for(int i=0;i<2;i++){
for(int j=0;j<2;j++){
}
}
return 0;
}
void calculation(int (*x)[2],int (*y)[2],int (*ans)[2])
{
for(int i=0;i<2;i++){
for(int j=0;j<2;j++){
for(int k=0;k<2;k++){
ans[i][j]=ans[i][j]+x[i][k]*y[k][j];
}
}
}
}
I2luY2x1ZGUgPHN0ZGlvLmg+Cgp2b2lkIGNhbGN1bGF0aW9uKGludCAoKngpWzJdLGludCAoKnkpWzJdLGludCAoKmFucylbMl0pOwoKaW50IG1haW4odm9pZCkgewoJCglpbnQgeFsyXVsyXT17MSwyLDMsNH07CglpbnQgeVsyXVsyXT17MSwyLDMsNH07CglpbnQgYW5zWzJdWzJdPXswfTsKCQoJY2FsY3VsYXRpb24oeCx5LGFucyk7CgkKCWZvcihpbnQgaT0wO2k8MjtpKyspewoJCWZvcihpbnQgaj0wO2o8MjtqKyspewoJCQlwcmludGYoIiUyZCIsYW5zW2ldW2pdKTsKCQl9CgkJcHJpbnRmKCJcbiIpOwoJfQoJCglyZXR1cm4gMDsKfQkKCnZvaWQgY2FsY3VsYXRpb24oaW50ICgqeClbMl0saW50ICgqeSlbMl0saW50ICgqYW5zKVsyXSkKewoJZm9yKGludCBpPTA7aTwyO2krKyl7CgkJZm9yKGludCBqPTA7ajwyO2orKyl7CgkJCWZvcihpbnQgaz0wO2s8MjtrKyspewoJCQkJCgkJCQlhbnNbaV1bal09YW5zW2ldW2pdK3hbaV1ba10qeVtrXVtqXTsKCQkJCQoJCQl9CgkJfQoJfQp9