АВТ
Language:

Remote Training on Programming

Problems On-line status Contests FAQ
For authors:
Register  ||  Login
 
Hello, Guest! Login or register.

953. Count of max

Time Limit: 1 seconds
Memory Limit:1000KB
Points:10
View Problem Statistics Submit Problem added Undefined

Дана последовательность чисел. Выяснить, сколько раз в ней встречается максимальное число

Input

Вводится сначала число N - количество членов последовательности (N не более 1 миллиона), а затем N чисел - члены последовательности (в диапазоне от 0 до 10^9). Числа разделяются пробелами и/или переводами строк.

Output

Выведите одно число - сколько раз в последовательности встречается максимальное число.

Sample

InputOutput
Пример 1. Вход:
7
1 4 2 5 2 5 3
Пример 1. Выход:
2

View Problem Statistics Submit Author/source:
Educational Courses / Programming and Basics of Algorithmization / Cycles /
953. 164. Draw Square 136. Factorial of Number 130. Happy Ticket
We can all benefit by doing occasional "toy" programs, when artificial restrictions are set up, so that we are forced to push our abilities to the limit. The art of tackling miniproblems with all our energy will sharpen our talents for the real problems. Donald E. Knuth.
time generating 0.453 sec.
© Copyright VSTU, AVT, Nosov D.A.