1275: 求数组最大值

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:117 Solved:88

Description

给定一个长度为 $n$ 的序列。

请定义一个函数,能返回该序列的最大值。

函数格式如下:

int max_of_array (int a[], int n)

Input

共两行。

第一行,包含一个正整数 $n$,表示序列的长度。

第二行,包含 $n$ 个正整数,中间以空格隔开,表示序列。

Output

输出给定序列的最大值。

Sample Input Copy

3
1 2 3 

Sample Output Copy

3

HINT

数据范围:

$0< n \le 100$,

$ 0 \lt 序列元素 \le 1000$。

Source/Category