LCC '18 Contest 1 J1 - Tall People

View as PDF

Submit solution

Points: 3 (partial)
Time limit: 2.0s
Memory limit: 64M

Problem type

Emily is very tall. In fact, she is one of the tallest people in the school!

You are given the heights of N students from Mackenzie. Print Emily's height!

Input Specification

The first line will contain the integer N (1 \le N \le 10^5), the number of students.

The second line will contain N integers, h_1, h_2, \ldots, h_N (1 \le h_i \le 10^9), the heights of the N people in the school.

Note that it is not guaranteed the heights of each student is unique.

Output Speciciation

On the first line, print Emily's height (the largest height in the input)!


Subtask 1 [30%]

N \le 100

Subtask 2 [70%]

No further constraints.

Sample Input 1

1 4 2 6 6

Sample Output 1


Sample Input 2

999999 1000000

Sample Output 2



There are no comments at the moment.