#include <stdio.h>
void cal_array(const int (*x)[3], const int (*y)[3], int (*ans)[3] );
int main(void) {
int x[2][3]={1,2,3,4,5,6};
int y[2][3]={0,1,2,3,4,5};
int ans[2][3]={0};
cal_array(x,y,ans);
return 0;
}
void cal_array(const int (*x)[3], const int (*y)[3], int (*ans)[3] ){
for(int i=0;i<2;i++){
for(int j=0;j<3;j++){
ans[i][j]=(x[i][j]+y[i][j]);
}
}
for(int i=0;i<2;i++){
for(int j=0;j<3;j++){
ans[i][j]=(x[i][j]-y[i][j]);
}
}
}
I2luY2x1ZGUgPHN0ZGlvLmg+Cgl2b2lkIGNhbF9hcnJheShjb25zdCBpbnQgKCp4KVszXSwgY29uc3QgaW50ICgqeSlbM10sIGludCAoKmFucylbM10gKTsKaW50IG1haW4odm9pZCkgewoJaW50IHhbMl1bM109ezEsMiwzLDQsNSw2fTsKCWludCB5WzJdWzNdPXswLDEsMiwzLDQsNX07CglpbnQgYW5zWzJdWzNdPXswfTsKCWNhbF9hcnJheSh4LHksYW5zKTsKCQoJcmV0dXJuIDA7Cn0KCXZvaWQgY2FsX2FycmF5KGNvbnN0IGludCAoKngpWzNdLCBjb25zdCBpbnQgKCp5KVszXSwgaW50ICgqYW5zKVszXSApewoJCXByaW50ZigiYWRkXG4iKTsKCQlmb3IoaW50IGk9MDtpPDI7aSsrKXsKCQkJZm9yKGludCBqPTA7ajwzO2orKyl7CgkJCQlhbnNbaV1bal09KHhbaV1bal0reVtpXVtqXSk7CgkJCQlwcmludGYoIiVk44CAIixhbnNbaV1bal0pOwoJCQl9CgkJCXB1dGNoYXIoJ1xuJyk7CgkJfQoJCXB1dGNoYXIoJ1xuJyk7CgkJcHJpbnRmKCJzdWJcbiIpOwoJCWZvcihpbnQgaT0wO2k8MjtpKyspewoJCQlmb3IoaW50IGo9MDtqPDM7aisrKXsKCQkJCWFuc1tpXVtqXT0oeFtpXVtqXS15W2ldW2pdKTsKCQkJCXByaW50ZigiJWTjgIAiLGFuc1tpXVtqXSk7CgkJCX0KCQkJcHV0Y2hhcignXG4nKTsKCQl9CgkJcHV0Y2hhcignXG4nKTsKCQkKCX0=