Description
A matrix consisting of n x n (both length and width are N) consisting of lowercase English letters is provided. It is required that each row be sorted in alphabetical order and then output after being reversed.
Input
The input contains N + 1 rows. The first row is an integer N, followed by a string of N rows with a length of N. Where 0 <n <= 100, all letters are lowercase letters.
Output
The Phalanx after each row is sorted and reversed.
Sample Input
3 abcedfigh
Sample output
Ghidefabc
# Include <stdio. h> int main () {int I; Int J; int N; int L; int t; char array [101] [101]; while (scanf ("% d ", & N )! = EOF & (n> 0 & n <= 100) {for (I = 0; I <n; I ++) {scanf ("% s ", array [I]) ;}for (I = 0; I <n; I ++) {for (j = 0; j <n-1; j ++) {for (L = J + 1; L <n; l ++) {If (array [I] [J]> array [I] [l]) {T = array [I] [J]; array [I] [J] = array [I] [l]; array [I] [l] = T ;}}}for (I = n-1; I> = 0; I --) {for (j = 0; j <N; j ++) {printf ("% C", array [I] [J]);} printf ("\ n") ;}} return 0 ;}