#P413. 【例71.2】 01串排序
【例71.2】 01串排序
Description
Sort the binary strings first by length, then by the number of 's if lengths are equal, and finally by ASCII value (lexicographical order) if the number of 's is also equal.
Input Format
The first line contains an integer (), representing the number of strings.
The input data contains some binary strings, with each string's length not exceeding characters.
Output Format
Rearrange the order of the binary strings according to the sorting rules described above, and output them in sequence.
Sample
6
10011111
00001101
1010101
1
0
11000
1
1100
1010101
00001101
10011111