Submit | All submissions | Best solutions | Back to list |
EI2121Q1M2 - A List of Staffs 2 |
Given a list of staff in a company. Each staff has a start year (when he/she joined the company).
Output the number of staff joined the company each year.
Input
- The first line contains one integer N - the number of staffs (1 £ N £ 105).
- The second line contains N integers which are the start year of N staffs.
Output
The list of years and number of staffs joined in the corresponding year. The list should be sorted by ascending year.
Sample
Input |
Output |
10 1999 2005 2021 2015 2016 2001 2005 1999 2021 2010 |
1999 2 2001 1 2005 2 2010 1 2015 1 2016 1 2021 2 |