#define TEAM 0 /* Your team # here */ #define PROBLEM 3 /* The problem # here */ #include #include #include #include FILE *in=0; FILE *out=0; void solve_problem(); int debug = 0; /*-----------------------------------------------------*/ int main(int argc, char *argv[]) { char inputFilename[64]; char outputFilename[64]; int teamNumber = TEAM; int j; sprintf(inputFilename, "prob%d.dat", PROBLEM); sprintf(outputFilename,"prob%d.out", PROBLEM); /* Process the command line arguments. This can change the filenames and/or team number */ j=1; while (j0; r--) matrix[r][c] = matrix[r-1][c]; matrix[0][c] = temp; } if (debug) { printf("After shake\n"); printMatrix(matrix, size); } } /*-----------------------------------------------------*/ void rattle(char matrix[100][100], int size) { int r, c; char temp; /* odd rows - 0, 2, 4, etc shifted right */ for (r=0; r0; c--) matrix[r][c] = matrix[r][c-1]; matrix[r][0] = temp; } /* even rows - 1, 3, 5, 7, etc. shifted left */ for (r=1; rloop; c--) matrix[r][c] = matrix[r][c-1]; /* right column of loop */ c = size-1-loop; temp2 = matrix[c][c]; for (r=c; r>loop; r--) matrix[r][c] = matrix[r-1][c]; matrix[loop+1][c] = temp1; /* bottom row of loop */ r = size-1-loop; temp3 = matrix[r][loop]; for (c=loop; cloop; r--) matrix[r][c] = matrix[r-1][c]; matrix[loop+1][c] = temp1; /* bottom row of loop */ r = size-1-loop; temp3 = matrix[r][r]; for (c=size-1-loop; c>loop; c--) matrix[r][c] = matrix[r][c-1]; matrix[r][loop+1] = temp2; /* right column of loop */ c = size-1-loop; for (r=loop; r