Advertisement
artur99

Untitled

Apr 28th, 2017
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.33 KB | None | 0 0
  1. #include <iostream>
  2. #include <algorithm>
  3. using namespace std;
  4. int main(){
  5.     int n,k=-9999,t=0,i,f=0;
  6.     cin>>n;int v[n];
  7.     for(i=0;i<n;i++){
  8.         cin>>t;
  9.         if(t%2==0){
  10.             if(k==-9999)k=t;
  11.             else if(t<k){f=1;break;}
  12.             else k=t;
  13.         }
  14.     }
  15.     cout<<(f?"NU":"DA");
  16.     return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement