Advertisement
Saleh127

Untitled

Apr 24th, 2020
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5. int x[10000],y[10000],n,i,j,k,l=0,a,c,b,d;
  6. cin>>n;
  7. for(i=0;i<n;i++)
  8. {
  9. cin>>x[i]>>y[i];
  10. }
  11. for(i=0;i<n;i++)
  12. {
  13. a=0,b=0,c=0,d=0;
  14. for(j=0;j<n;j++)
  15. {
  16. if(x[i]>x[j] && y[i]==y[j]) a=1;
  17. if(x[i]<x[j] && y[i]==y[j]) b=1;
  18. if(x[i]==x[j] && y[i]>y[j]) c=1;
  19. if(x[i]==x[j] && y[i]<y[j]) d=1;
  20. }
  21. if(a&&b&&c&&d) l++;
  22. }
  23. cout<<l<<endl;
  24. return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement