Advertisement
a53

VerifParitate1

a53
Apr 18th, 2022
98
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. int main()
  5. {
  6. ios_base::sync_with_stdio(0);
  7. cin.tie(0);
  8. cout.tie(0);
  9. cin>>n;
  10. for(int i=1;i<=n;++i)
  11. cin>>v[i];
  12. ok=1;
  13. for(int i=1;i<=n/2&& ok;++i)
  14. if((v[i]+v[n-i+1])%2==1)
  15. ok=0;
  16. if(ok)
  17. cout<<"DA";
  18. else
  19. cout<<"NU";
  20. return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement