Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
452 B
2
Indexable
Never
#include <iostream>
using namespace std;
int main () {

   int n;
   cin >>n;
   int a[n];
   int test1=0,test2=0;
   for (int i=0;i<n;i++)
      {
      	cin >> a[i];
	  }
	for (int i=0;i<n;i++)
	  {
	  	if (a[i]<a[i+1]) test1++;
	  	if (a[i]>a[i+1]) test2++;
		  
	  }
	if (test1==n) {
		cout << "tang"; return 0;
	}
	if (test2==n) {
		cout << "giam"; return 0;
	}
	if (test1!=n && test2!=n) cout << "khac";
   return 0;
}