Fashion Elements 3
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
In the provided array of integers, your task is to identify the elements that appear most frequently. First, determine and output the highest frequency of any element in the array. Then, list the elements that occur with this maximum frequency, maintaining the order of their first appearance in the input.
Input Data
The first line contains the integer N, representing the number of elements in the array. The second line contains N integers, each with an absolute value not exceeding 100.
Output Data
On the first line, output the maximum frequency of any element. On the second line, output the elements that occur with this maximum frequency, in the order of their first appearance.
Examples
Input #1
Answer #1
Submissions 1K
Acceptance rate 44%