hiho week 143 register

Ended

Participants:1650

Verdict:Accepted
Score:100 / 100
Submitted:2017-03-30 17:33:38

Lang:Java

Edit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import java.util.Scanner;
public class Main
{
    public static void main(String[] args)
    {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int[] keyArray = new int[n+1];
        keyArray[n= Integer.MAX_VALUE;//
        for (int i = 0;i < n;i++)
            keyArray[i= scanner.nextInt();
        handle(keyArray);
    }
    private static void handle(int[] keyArray)
    {
        int index = 0;//keyArray
        for(int i = 0;i < keyArray.length - 1;i++)//keyArray.length - 1
        {
            if(isAscendingOrder(keyArray,i))//
            {
                index = i;//
                break;
            }
        }
        System.out.print(keyArray[0]);
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX