Favourite Singer

2.8

170 votes
Basics of Input/Output, Input/Output, Basic Programming
Problem

Bob has a playlist of N songs, each song has a singer associated with it (denoted by an integer)

Favourite singer of Bob is the one whose songs are the most on the playlist

Count the number of Favourite Singers of Bob

Input Format 

The first line contains an integer N, denoting the number of songs in Bob's playlist.

The following input contains N integers, ith integer denoting the singer of the ith song.

Output Format

Output a single integer, the number of favourite singers of Bob

Note: Use 64 bit data type

Constraints

1N21051a[i]1015

Sample Input
5
1 1 2 2 4
Sample Output
2
Time Limit: 1
Memory Limit: 256
Source Limit:
Explanation

In this example
Songs of singer 1 and 2 appear 2 times(which is max) in this playlist 
Therefore the answer is 2

Editor Image

?