Advertisement
a53

VerifDiferite

a53
Feb 3rd, 2020
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. long int v[501],u[10000];
  4.  
  5. int main()
  6. {
  7. long int n,i,ma=-1;
  8. cin>>n;
  9. for(i=1;i<=n;++i)
  10. cin>>v[i],ma=max(v[i],ma),++u[v[i]];
  11. for(i=1;i<=ma;i++)
  12. if(u[i]>1)
  13. {
  14. cout<<"NU";
  15. return 0;
  16. }
  17. cout<<"DA";
  18. return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement