WEBSITE RETURNED, HOWEVER SUBMIT QUANTITY IS RESTRICTED PER DAY TO VERY LITTLE (UNDER JUDGE0 NEW POLICY, API PROVIDER). Therefore it is very much for you to pay attention TEST CAREFULLY CODE BEFORE SUBMIT.

Check the increment array, reduction

Threads: Enter a numeric array of n elements. Check that this is an ascending array, or gradually decrease, or neither increase nor decrease. Ascending array is larger array that follows the previous number, Descending array is where the previous number is greater than the next number.
Input: The first line is an integer n. The second line 2 n is an integer array, of numbers separated by spaces.
Output: Nếu mảng tăng dần in ra “TANG”, Nếu mảng giảm dần in ra “GIAM” nếu không tăng, không giảm thì in ra “KHONG”.

For example 1:
Input:
4
3 5 7 8
Out:TANG
Ví dụ 2:
Input:
4
9 7 7 1
Out:KHONG

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

Add a Comment