Advertisement
rengetsu

ProcedurProgramavimas_2.05

Mar 12th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.32 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. int main()
  4. {
  5. int n, z[11], q=1, d;
  6. cin>>n;
  7. for(int i=0;i<n;i++)
  8. {
  9. cin>>z[i];
  10. }
  11. for(int i=0;i<n;i++)
  12. {
  13.     d=i;
  14.     for(int l=0;l<n-1;l++)
  15.     {
  16.         if(z[d]!=z[d+q])
  17.         {q++;}else{cout<<"NE"<<endl;return 0;}
  18.        
  19.     }
  20. }
  21. cout<<"TAIP"<<endl;
  22. return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement