2292: Question 6: A difficult question

内存限制:32 MB 时间限制:1 S 标准输入输出
题目类型:传统 评测方式:文本比较 上传者:
提交:3 通过:3

题目描述

There are N Numbers, is between 0 to 9 (including 0 and 9).Now we want to know what kinds of Numbers of the N Numbers, and how many are there in the each number respectively?

输入格式

There have multiple sets of test data.

Input an integer N in the first line of each sets of test data.

Output N numbers in the second line .

输出格式

For each test data, output an integer K means appear K kinds of different numbers,

The next K lines, each line output two integers Ai and Bi, said Ai this number is present Bi.

输入样例 复制

5
5 5 2 2 1
6
1 9 9 2 3 0

输出样例 复制

3
1 1
2 2
5 2
5
0 1
1 1
2 1
3 1
9 2

数据范围与提示

Proposition:ZUFE_ZZT Translator:Angie