Advertisement
Saleh127

at 179b

Sep 19th, 2020
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. #define ll long long
  4. #define test int t; cin>>t; for(int cs=1;cs<=t;cs++)
  5. int main()
  6. {
  7. ios_base::sync_with_stdio(0);
  8. cin.tie(0);cout.tie(0);
  9.  
  10. ll a[105][2];
  11. ll i,j,k,l,d,e,f;
  12. cin>>d;
  13. for(i=0;i<d;i++)
  14. {
  15. for(j=0;j<2;j++)
  16. {
  17. cin>>a[i][j];
  18. }
  19. }
  20.  
  21. for(i=0;i<d-2;i++)
  22. {
  23. if(a[i][0]==a[i][1] && a[i+1][0]==a[i+1][1] && a[i+2][0]==a[i+2][1])
  24. {
  25. cout<<"Yes"<<endl;
  26. return 0;
  27. }
  28. }
  29. cout<<"No"<<endl;
  30. return 0;
  31. }
  32.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement