3064: 函数-求数组最大值下标

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:17 Solved:12

Description

定义函数int maxIndex(int arr[], int len),返回数组中最大值的第一个下标。主函数输入数组长度和元素,调用该函数输出最大值下标。

Input

第一行输入数组长度 n,第二行输入 n 个整数

Output

最大值的第一个下标(下标从 0 开始)

Sample Input Copy

5 3 8 6 8 2

Sample Output Copy

1

HINT

:n ∈ [1, 100],数组元素 ∈ [-1000, 1000]