#include<stdio.h>
#define ROW 4
#define COL 4
int M[ROW][COL] = {{1, 2, 3, 4}, {5, 6, 7, 8},{ 9, 10, 11, 12}, {13, 14, 15, 16}};
int main()
{
int i, j, t;
for (i = 0; i < 4; ++i)
{
for(j = 0; j < 4; ++j){
t = M[j][i];
M[i][j] = M[j][i];
M[j][i] = t;
}
}
for (i = 0; i < 4; ++i)
{
for (j = 0; j < 4; ++j)
}
}
I2luY2x1ZGU8c3RkaW8uaD4KI2RlZmluZSBST1cgNAojZGVmaW5lIENPTCA0CmludCBNW1JPV11bQ09MXSA9IHt7MSwgMiwgMywgNH0sIHs1LCA2LCA3LCA4fSx7IDksIDEwLCAxMSwgMTJ9LCB7MTMsIDE0LCAxNSwgMTZ9fTsKaW50IG1haW4oKQp7CiAgICBpbnQgaSwgaiwgdDsKICAgIGZvciAoaSA9IDA7IGkgPCA0OyArK2kpCiAgICB7CiAgICAgICAgZm9yKGogPSAwOyBqIDwgNDsgKytqKXsKICAgICB0ID0gTVtqXVtpXTsKICAgICBNW2ldW2pdID0gTVtqXVtpXTsKICAgICBNW2pdW2ldID0gdDsKfQogICAgfQogICAgZm9yIChpID0gMDsgaSA8IDQ7ICsraSkKICAgIHsKICAgICAgICBmb3IgKGogPSAwOyBqIDwgNDsgKytqKQogICAgICAgICAgICBwcmludGYgKCIlZCAiLCBNW2ldW2pdKTsKICAgICAgcHJpbnRmICgiXG4iKTsKICAgIH0KfQ==