Thứ Hai, 22 tháng 4, 2019

Cho mot mang so nguyen, tim gia tri lon nhat cua A(i)%A(j)

Chef and Dhyey have become friends recently. Chef wants to test Dhyey's intelligence by giving him a puzzle to solve.
The puzzle contains an integer sequence
. The answer to the puzzle is the maximum of , taken over all valid ,
.
Help Dhyey solve this puzzle.

Input

  • The first line of each test case contains a single integer
  • .
  • The second line contains
  • space-separated integers
    • .

    Output

    For each test case, print a single line containing one integer — the answer to the puzzle.

    Constraints


  • for each valid

    Subtasks

    Subtask #1 (30 points):
    Subtask #2 (70 points):

    Example Input 1

    5  
    1 2 3 4 5  
    

    Example Output 1

    4  
    

    Example Input 2

    6  
    5 5 5 2 3 8
    

    Example Output 2

    5
    

    Không có nhận xét nào:

    Đăng nhận xét