WEBSITE RETURNED, TUY NHIÊN SỐ LƯỢNG SUBMIT BỊ GIỚI HẠN MỖI NGÀY CÒN RẤT ÍT (UNDER JUDGE0 NEW POLICY, API PROVIDER). Therefore it is very much for you to pay attention TEST CAREFULLY CODE BEFORE SUBMIT.

Min max in the array

Threads: Enter array of n integers. Find the largest and smallest number in array.
Input: The first line is an integer n. The second line 2 n is an integer array, of numbers separated by spaces.
Output: A line of 2 number is the largest and the smallest number in the array separated by spaces.
For example:

input:
3
1 2 3
output:
3 1

You are not logged in? Log in to Submit Now!

11 Comments

Add a Comment