SP27 SBANK - Sorting Bank Accounts
Description
In one of the internet banks thousands of operations are being performed every day. Since certain customers do business more actively than others, some of the bank accounts occur many times in the list of operations. Your task is to sort the bank account numbers in ascending order. If an account appears twice or more in the list, write the number of repetitions just after the account number. The format of accounts is as follows: $2$ control digits, an $8$-digit code of the bank, $16$ digits identifying the owner (written in groups of four digits), for example (at the end of each line there is exactly one space):
$\texttt{30\_10103538\_2222\_1233\_6160\_0142}$ Banks are real-time institutions and they need FAST solutions. If you feel you can meet the challenge within a very stringent time limit, go ahead! A well designed sorting algorithm in a fast language is likely to succeed.
Input Format
$t$ \[the number of tests $\le 5$\]
$n$ \[the number of accounts $\le 100 000$\]
\[list of accounts\]
\[empty line\]
\[next test cases\]
Output Format
\[sorted list of accounts with the number of repeated accounts\]
\[empty line\]
\[other results\]