Advertisement
a53

VerifParitate2

a53
Apr 18th, 2022
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. short int n,v[205],ok;
  4.  
  5. int main()
  6. {
  7. ios_base::sync_with_stdio(0);
  8. cin.tie(0);
  9. cout.tie(0);
  10. cin>>n;
  11. for(int i=1;i<=n;++i)
  12. cin>>v[i];
  13. ok=1;
  14. for(int i=1;i<=n/2&&ok;++i)
  15. if((v[i]+v[n-i+1])%2==0)
  16. ok=0;
  17. if(ok)
  18. cout<<"DA";
  19. else
  20. cout<<"NU";
  21. return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement