Advertisement
a53

PareOrdonate

a53
Apr 28th, 2017
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. #include <iostream>
  2. #include <algorithm>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. long int v[101],n,j,i;
  8. cin>>n;
  9. for(i=1;i<=n;i++)
  10. cin>>v[i];
  11. for(i=1;i<=n-1;i++)
  12. {
  13. if(v[i]%2==0)
  14. {
  15. for(j=i+1;j<=n;j++)
  16. if(v[j]%2==0 && v[j]<v[i])
  17. {
  18. cout<<"NU";
  19. return 0;
  20. }
  21. }
  22. }
  23. cout<<"DA";
  24. return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement