Advertisement
andreim618

Untitled

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