#include <stdio.h>
typedef struct {
int arr[4][4];
} FourByFour;
FourByFour rotate(FourByFour m) {
FourByFour D;
for(int i = 0; i < 4; i ++ ){
for(int n = 0; n < 4; n++){
D.arr[i][n] = m.arr[n][3 - i];
}
}
return D;
}
int main(void) {
FourByFour S = {.arr = { { 1, 4, 10, 3 }, { 0, 6, 3, 8 }, { 7, 10 ,8, 5 }, { 9, 5, 11, 2} } };
FourByFour r = rotate(S);
for(int i=0; i < 4; i ++ ){
for(int n=0; n < 4; n++){
}
}
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+Cgp0eXBlZGVmIHN0cnVjdCB7CglpbnQgYXJyWzRdWzRdOwp9IEZvdXJCeUZvdXI7CgpGb3VyQnlGb3VyIHJvdGF0ZShGb3VyQnlGb3VyIG0pIHsKICAgIEZvdXJCeUZvdXIgRDsKICAgIGZvcihpbnQgaSA9IDA7IGkgPCA0OyBpICsrICl7CiAgICAgICAgZm9yKGludCBuID0gMDsgbiA8IDQ7IG4rKyl7CiAgICAgICAgICAgIEQuYXJyW2ldW25dID0gbS5hcnJbbl1bMyAtIGldOwogICAgICAgIH0KICAgIH0KICAgIHJldHVybiBEOwp9CgppbnQgbWFpbih2b2lkKSB7CglGb3VyQnlGb3VyIFMgPSB7LmFyciA9IHsgeyAxLCA0LCAxMCwgMyB9LCB7IDAsIDYsIDMsIDggfSwgeyA3LCAxMCAsOCwgNSB9LCAgeyA5LCA1LCAxMSwgMn0gIH0gfTsKCUZvdXJCeUZvdXIgciA9IHJvdGF0ZShTKTsKCWZvcihpbnQgaT0wOyBpIDwgNDsgaSArKyApewogICAgICAgIGZvcihpbnQgbj0wOyBuIDwgNDsgbisrKXsKICAgICAgICAgICAgcHJpbnRmKCIlZCAiLCByLmFycltpXVtuXSk7CiAgICAgICAgfQogICAgICAgIHByaW50ZigiXG4iKTsKICAgIH0KCXJldHVybiAwOwp9Cg==