Advertisement
shabbyheart

Untitled

May 13th, 2019
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. include <iostream>
  2. using namespace std;
  3. int x[201],y[201];
  4. int main(){
  5. int n,p=0,l=0,v=0,ni=0,cnt=0;
  6. cin>>n;
  7. for(int i=1;i<=n;i++){
  8. cin>>x[i]>>y[i];
  9. }
  10. for(int i=1;i<=n;i++){
  11. for(int j=1;j<=n;j++){
  12. if(x[j]==x[i] && y[j]>y[i]){
  13. v=1;
  14. }
  15. if(x[j]==x[i] && y[j]<y[i]){
  16. ni=1;
  17. }
  18. if(x[j]>x[i] && y[j]==y[i]){
  19. p=1;
  20. }
  21. if(x[j]<x[i] && y[j]==y[i]){
  22. l=1;
  23. }
  24. }
  25. if(l==1 && p==1 && ni==1 && v==1){
  26. cnt++;
  27. }
  28. l=0;
  29. p=0;
  30. ni=0;
  31. v=0;
  32. }
  33. cout<<cnt;
  34. return 0;
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement